sphinx-thebe icon indicating copy to clipboard operation
sphinx-thebe copied to clipboard

Make the thebe package URL configurable

Open akhmerov opened this issue 3 years ago • 2 comments

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

  1. Thebe intends to introduce breaking changes (see e.g. https://github.com/executablebooks/thebe/issues/230)
  2. Now it's published under a different name (thebe instead of thebelab)
  3. Some applications may prefer to ship their own version of the js library (e.g. for working offline, etc).
  4. 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.

akhmerov avatar May 01 '21 12:05 akhmerov

Maybe a config called thebe_url ?

choldgraf avatar May 01 '21 15:05 choldgraf

@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

choldgraf avatar Aug 28 '21 15:08 choldgraf