Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the thebe package URL configurable #24

Open
akhmerov opened this issue May 1, 2021 · 2 comments
Open

Make the thebe package URL configurable #24

akhmerov opened this issue May 1, 2021 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers 🏷️ configuration

Comments

@akhmerov
Copy link
Contributor

akhmerov commented May 1, 2021

Description

Right now the thebe package is hard-coded in the codebase:

logger = logging.getLogger(__name__)
THEBE_VERSION = "0.5.1"

and loaded here

# Add core libraries
opts = {"async": "async"}
app.add_js_file(
filename=f"https://unpkg.com/thebe@{THEBE_VERSION}/lib/index.js", **opts
)

This should be configurable for the documentation author.

Benefit

  1. Thebe intends to introduce breaking changes (see e.g. Finish the rename + migration thebe#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 akhmerov added the enhancement New feature or request label May 1, 2021
@choldgraf
Copy link
Member

Maybe a config called thebe_url ?

@choldgraf choldgraf changed the title Improve handling of thebe URL Make the thebe package URL configurable Aug 28, 2021
@choldgraf
Copy link
Member

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers 🏷️ configuration
Projects
None yet
Development

No branches or pull requests

2 participants