sphinx-thebe
sphinx-thebe copied to clipboard
Make the thebe package URL configurable
Description
Right now the thebe package is hard-coded in the codebase:
https://github.com/executablebooks/sphinx-thebe/blob/c036ac41a3b681ed4c2ab3b92edee4a3d2d2e1f0/sphinx_thebe/init.py#L12-L16
and loaded here
https://github.com/executablebooks/sphinx-thebe/blob/c036ac41a3b681ed4c2ab3b92edee4a3d2d2e1f0/sphinx_thebe/init.py#L66-L71
This should be configurable for the documentation author.
Benefit
- Thebe intends to introduce breaking changes (see e.g. https://github.com/executablebooks/thebe/issues/230)
- Now it's published under a different name (thebe instead of thebelab)
- Some applications may prefer to ship their own version of the js library (e.g. for working offline, etc).
- Some smaller/stale packages won't rebuild often. This means their deployed documentation will break.
Implementation
This change would entail adding a new configuration value like thebe_version
. It could either be just a version string, or it could be a link to the whole thebe bundle if it's better to manually specify this.
Maybe a config called thebe_url ?
@akhmerov just FYI the version is now pinned, so I'm scoping this issue just to configurability
https://github.com/executablebooks/sphinx-thebe/blob/master/sphinx_thebe/init.py#L134