Skip to content

Commit ac6e304

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

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
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/users/index.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@
77
Users guide
88
###########
99

10+
Try Matplotlib directly in this documentation!
11+
12+
.. replite::
13+
:kernel: python
14+
:height: 500px
15+
16+
import matplotlib.pyplot as plt
17+
import numpy as np
18+
19+
x = np.linspace(0, 2 * np.pi, 200)
20+
y = np.sin(x)
21+
22+
fig, ax = plt.subplots()
23+
ax.plot(x, y)
24+
plt.show()
25+
1026
General
1127
#######
1228

@@ -29,7 +45,7 @@ Tutorials and examples
2945
../tutorials/index.rst
3046
../gallery/index.rst
3147

32-
Reference
48+
Reference
3349
#########
3450

3551
.. 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
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 commit comments

Comments
 (0)