1
- From f95c7a7a393f0eef9989dddffc70a09ac0a14c35 Mon Sep 17 00:00:00 2001
1
+ From fa6e7b31ebd7f6dbf02e1e4c1056e4ef1389884e Mon Sep 17 00:00:00 2001
2
2
From: Kwankyu Lee <
[email protected] >
3
3
Date: Mon, 28 Aug 2023 00:18:59 +0900
4
4
Subject: [PATCH] Patch for sage live doc
5
5
6
6
---
7
- jupyter_sphinx/__init__.py | 8 +++++-- -
7
+ jupyter_sphinx/__init__.py | 2 + -
8
8
jupyter_sphinx/execute.py | 11 +++++++++++
9
- 2 files changed, 16 insertions(+), 3 deletions (-)
9
+ 2 files changed, 12 insertions(+), 1 deletion (-)
10
10
11
11
diff --git a/jupyter_sphinx/__init__.py b/jupyter_sphinx/__init__.py
12
- index 34af884..f5a7f44 100644
12
+ index 34af884..f2e17e0 100644
13
13
--- a/jupyter_sphinx/__init__.py
14
14
+++ b/jupyter_sphinx/__init__.py
15
- @@ -2,6 +2,7 @@
16
-
17
- from pathlib import Path
18
-
19
- + import os
20
- import docutils
21
- import ipywidgets
22
- from IPython.lib.lexers import IPython3Lexer, IPythonTracebackLexer
23
- @@ -31,7 +32,7 @@ from .thebelab import ThebeButton, ThebeButtonNode, ThebeOutputNode, ThebeSource
15
+ @@ -31,7 +31,7 @@ from .thebelab import ThebeButton, ThebeButtonNode, ThebeOutputNode, ThebeSource
24
16
REQUIRE_URL_DEFAULT = (
25
17
"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"
26
18
)
@@ -29,25 +21,6 @@ index 34af884..f5a7f44 100644
29
21
30
22
logger = logging.getLogger(__name__)
31
23
32
- @@ -186,7 +187,7 @@ def setup(app):
33
- app.add_config_value("jupyter_sphinx_embed_url", None, "html")
34
-
35
- # thebelab config, can be either a filename or a dict
36
- - app.add_config_value("jupyter_sphinx_thebelab_config", None, "html")
37
- + app.add_config_value("jupyter_sphinx_thebelab_config", None, "env")
38
- app.add_config_value("jupyter_sphinx_thebelab_url", THEBELAB_URL_DEFAULT, "html")
39
-
40
- # linenos config
41
- @@ -290,7 +291,8 @@ def setup(app):
42
- app.add_lexer("ipythontb", IPythonTracebackLexer)
43
- app.add_lexer("ipython3", IPython3Lexer)
44
-
45
- - app.connect("builder-inited", builder_inited)
46
- + if os.environ.get('SAGE_LIVE_DOC', 'no') == 'yes':
47
- + app.connect("builder-inited", builder_inited)
48
- app.connect("build-finished", build_finished)
49
-
50
- # add jupyter-sphinx and thebelab js and css
51
24
diff --git a/jupyter_sphinx/execute.py b/jupyter_sphinx/execute.py
52
25
index 558a26b..de44455 100644
53
26
--- a/jupyter_sphinx/execute.py
0 commit comments