-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use jsdelivr CDN for ipywidgets (#491)
* fix: use jsdelivr CDN * chore: bump ipywidgets version to 8.0 * docs: add note about ipywidgets
- Loading branch information
Showing
2 changed files
with
17 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -90,6 +90,22 @@ show(p) | |
|
||
## ipywidgets | ||
|
||
:::{note} | ||
IPyWidgets uses a special JS package `@jupyter-widgets/html-manager` for rendering Jupyter widgets outside notebooks. `myst-nb` loads a specific version of this package, which may be incompatible with your installation of IPyWidgets. If this is the case, you might need to specify the appropriate `nb_ipywidgets_js` config value, e.g. for `0.20.0` | ||
```yaml | ||
|
||
sphinx: | ||
recursive_update: true | ||
config: | ||
nb_ipywidgets_js: | ||
# Load IPywidgets bundle for embedding. | ||
"https://cdn.jsdelivr.net/npm/@jupyter-widgets/[email protected]/dist/embed-amd.js": | ||
"data-jupyter-widgets-cdn": "https://cdn.jsdelivr.net/npm/" | ||
"crossorigin": "anonymous" | ||
``` | ||
To determine which version of `@jupyter-widgets/html-manager` is required, find the `html-manager` JS package in the [`ipywidgets` repo](https://github.com/jupyter-widgets/ipywidgets), and identify its version. | ||
::: | ||
|
||
You may also run code for Jupyter Widgets in your document, and the interactive HTML | ||
outputs will embed themselves in your side. See [the ipywidgets documentation](https://ipywidgets.readthedocs.io/en/latest/user_install.html) | ||
for how to get set up in your own environment. | ||
|
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