Skip to content

Make the thebe package URL configurable #24

Open

Description

@akhmerov

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 jupyter-book/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.

Activity

  1. choldgraf commented on May 1, 2021

    @choldgraf
    Member

    Maybe a config called thebe_url ?

  2. changed the title [-]Improve handling of thebe URL[/-] [+]Make the thebe package URL configurable[/+] on Aug 28, 2021
  3. choldgraf commented on Aug 28, 2021

    @choldgraf
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions