Skip to content

Commit 75038a3

Browse files
committed
Add replite console to the users docs
1 parent beba0de commit 75038a3

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-2
lines changed

doc/conf.py

Lines changed: 1 addition & 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 = [

doc/index.rst

Lines 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/users/index.rst

Lines 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

Lines 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.2
4041
# testing
4142
- coverage
4243
- flake8>=3.8

requirements/doc/doc-requirements.txt

Lines 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.2

0 commit comments

Comments
 (0)