Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ce4fa5c

Browse filesBrowse files
committed
Add replite console to the users docs
1 parent 9cf03c0 commit ce4fa5c
Copy full SHA for ce4fa5c

File tree

6 files changed

+31
-2
lines changed
Filter options

6 files changed

+31
-2
lines changed

‎doc/conf.py

Copy file name to clipboardExpand all lines: doc/conf.py
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
'sphinxext.redirect_from',
7474
'sphinx_copybutton',
7575
'sphinx_panels',
76+
'jupyterlite_sphinx',
7677
]
7778

7879
exclude_patterns = [
@@ -535,6 +536,9 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
535536
1),
536537
]
537538

539+
# jupyterlite config
540+
jupyterlite_config = "jupyter_lite_config.json"
541+
538542
# numpydoc config
539543

540544
numpydoc_show_class_members = False

‎doc/index.rst

Copy file name to clipboardExpand all lines: doc/index.rst
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Installation
3636
3737
Further details are available in the :doc:`Installation Guide <users/installing/index>`.
3838

39-
4039
******************
4140
Learning resources
4241
******************

‎doc/jupyter_lite_config.json

Copy file name to clipboard
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"LiteBuildConfig": {
3+
"source_date_epoch": null
4+
}
5+
}

‎doc/users/index.rst

Copy file name to clipboardExpand all lines: doc/users/index.rst
+20-1Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@ General
1919
faq/index.rst
2020
resources/index.rst
2121

22+
Live example
23+
############
24+
25+
Try Matplotlib directly in this documentation!
26+
27+
.. replite::
28+
:kernel: python
29+
:height: 600px
30+
31+
import matplotlib.pyplot as plt
32+
import numpy as np
33+
34+
x = np.linspace(0, 2 * np.pi, 200)
35+
y = np.sin(x)
36+
37+
fig, ax = plt.subplots()
38+
ax.plot(x, y)
39+
plt.show()
40+
2241
Tutorials and examples
2342
######################
2443

@@ -29,7 +48,7 @@ Tutorials and examples
2948
../tutorials/index.rst
3049
../gallery/index.rst
3150

32-
Reference
51+
Reference
3352
#########
3453

3554
.. toctree::

‎environment.yml

Copy file name to clipboardExpand all lines: environment.yml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ dependencies:
3737
- pip:
3838
- mpl-sphinx-theme
3939
- sphinxcontrib-svg2pdfconverter
40+
- jupyterlite-sphinx>=0.4.3
4041
# testing
4142
- coverage
4243
- flake8>=3.8

‎requirements/doc/doc-requirements.txt

Copy file name to clipboardExpand all lines: requirements/doc/doc-requirements.txt
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ sphinxcontrib-svg2pdfconverter>=1.1.0
1919
sphinx-gallery>=0.10
2020
sphinx-copybutton
2121
sphinx-panels
22+
jupyterlite-sphinx>=0.4.3

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.