-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
226 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,31 @@ | ||
# Changelog | ||
|
||
## v0.1.0 | ||
## v0.1.0 - 2022-02-05 | ||
|
||
([full changelog](https://github.com/executablebooks/sphinx-thebe/compare/v0.0.10...4d1a60c5126ce633b1a36de43b4990b2f4d08730)) | ||
|
||
**Lazy load thebe javascript** [#41](https://github.com/executablebooks/sphinx-thebe/pull/41) ([@choldgraf](https://github.com/choldgraf)) | ||
|
||
`thebe` will now "lazily load" its javascript only when a bootstrap button is pressed, rather than loading the Javascript on each page. | ||
This saves on bandwidth and pageload speed, since Thebe is generally _not_ used on a page even if it _could_ be used. | ||
|
||
## v0.0.10 - 2021-08-24 | ||
|
||
([full changelog](https://github.com/executablebooks/sphinx-thebe/compare/v0.0.9...e18d1bf94a8fa79476f035a349bd63d03bba83e7)) | ||
|
||
This is a minor release to conditionally load the JS on pages that have a "launch button". | ||
This will save some load time on non-interactive pages. | ||
|
||
### Enhancements made | ||
|
||
- Option to conditionally load on pages, see [documentation for details](https://sphinx-thebe.readthedocs.io/en/latest/configure.html#only-load-js-on-certain-pages) [#30](https://github.com/executablebooks/sphinx-thebe/pull/30) ([@choldgraf](https://github.com/choldgraf)) | ||
|
||
### Other merged PRs | ||
|
||
- PIN: thebe v0.5.1 [#31](https://github.com/executablebooks/sphinx-thebe/pull/31) ([@choldgraf](https://github.com/choldgraf)) | ||
|
||
## v0.0.9 - 2021-08-21 | ||
|
||
### Updates | ||
|
||
- `sphinx-thebe` now uses the correct and latest version of thebe, since it has been renamed from `thebelab` to `thebe`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,2 @@ | ||
# Changelog | ||
|
||
## v0.0.10 - 2021-08-24 | ||
|
||
([full changelog](https://github.com/executablebooks/sphinx-thebe/compare/v0.0.9...e18d1bf94a8fa79476f035a349bd63d03bba83e7)) | ||
|
||
This is a minor release to conditionally load the JS on pages that have a "launch button". | ||
This will save some load time on non-interactive pages. | ||
|
||
### Enhancements made | ||
|
||
- Option to conditionally load on pages, see [documentation for details](https://sphinx-thebe.readthedocs.io/en/latest/configure.html#only-load-js-on-certain-pages) [#30](https://github.com/executablebooks/sphinx-thebe/pull/30) ([@choldgraf](https://github.com/choldgraf)) | ||
|
||
### Other merged PRs | ||
|
||
- PIN: thebe v0.5.1 [#31](https://github.com/executablebooks/sphinx-thebe/pull/31) ([@choldgraf](https://github.com/choldgraf)) | ||
|
||
## v0.0.9 - 2021-08-21 | ||
|
||
### Updates | ||
|
||
- `sphinx-thebe` now uses the correct and latest version of thebe, since it has been renamed from `thebelab` to `thebe`. | ||
```{include} ../CHANGELOG.md | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
jupytext: | ||
formats: md:myst | ||
text_representation: | ||
extension: .md | ||
format_name: myst | ||
kernelspec: | ||
display_name: Python 3 | ||
language: python | ||
name: python3 | ||
--- | ||
|
||
# Jupyter Notebooks | ||
|
||
This page was written for [MyST-NB](https://myst-nb.readthedocs.io/). | ||
It demonstrates `sphinx-thebe`'s usage with Jupyter Notebooks. | ||
|
||
Activate Thebe by clicking the launch button below. | ||
You should then be able to run and edit the code cell in the notebook. | ||
|
||
```{thebe-button} Launch thebe | ||
``` | ||
|
||
The outputs should be displayed below, but they will be collected by `sphinx-thebe` when it is activated so that they are cleared when you first run the cell. | ||
|
||
```{code-cell} | ||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
# Create some fake data | ||
data = np.random.randn(3, 1000) | ||
# Create a figure | ||
fig, ax = plt.subplots() | ||
# Plot data | ||
ax.scatter(data[0], data[1], c=np.abs(data[2]), s=np.abs(data[2])*100) | ||
``` | ||
|
||
## Code style | ||
|
||
Thebe uses CodeMirror in the background, which uses different styles than pygments, which is used for static code syntax highlighting. | ||
|
||
The below code block is **static** and will not be converted with `thebe`. | ||
We include it in order to compare the active Thebe cell's syntax highlighting with an inactive cell. | ||
|
||
``` | ||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
# Create some fake data | ||
data = np.random.randn(3, 1000) | ||
# Create a figure | ||
fig, ax = plt.subplots() | ||
# Plot data | ||
ax.scatter(data[0], data[1], c=np.abs(data[2]), s=np.abs(data[2])*100) | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.