Skip to content

Make the thebe package URL configurable #24

@akhmerov

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions