Jupyter extension to proxy MyST build server
Project description
jupyter-myst-build-proxy
A Jupyter server extension that serves and proxies static MyST websites.
Overview
jupyter-myst-build-proxy helps JupyterHub users development MyST-based websites. It can build the static HTML assets and serve them from a minimal python web server, allowing users to view MyST sites directly in a JupyterHub environment.
Features
- Path-based routing: Access MyST projects at
/myst-build/<project-path>/ - On-demand building: Automatically builds MyST sites when first accessed
- Rebuild support: Trigger rebuilds with
?rebuild=1query parameter - Multiple projects: Serve different MyST projects from subdirectories
- Error handling: Shows helpful error page when
myst.ymlis missing
Installation
pip install jupyter-myst-build-proxy
Usage
Basic Usage
With a jupyter application running, visit /myst-build/<project-path>/ where <project-path> is a directory containing a MyST project (with myst.yml).
Example 1: Jupyter server on localhost
http://localhost:8888/myst-build/my-documentation/
Example 2: Jupyter server on a JupyterHub
https://jupyterhub.example.edu/user/username/myst-build/my-website/
Configuration
Set the default directory using the JUPYTER_MYST_BUILD_PROXY_DIR environment variable to specify an alternative root for where the extension finds MyST projects. The default is the user's current working directory.
Rebuilding Sites
To force a rebuild of a MyST site, add ?rebuild=1 to any page URL:
http://localhost:8888/myst-build/my-documentation/?rebuild=1
This will delete the _build/html directory and regenerate the site.
Rebuild button
To have jupyter-myst-build-proxy run a post-build script which injects a "Rebuild" button into your site, set the JUPYTER_MYST_BUILD_PROXY_POSTBUILD environment variable to any value.
With this functionality enabled, users click this button instead of editing the URL to trigger a rebuild.
How It Works
-
When you access
/myst-build/<project-path>/, the extension:- Checks if
<project-path>/myst.ymlexists - If the site hasn't been built, runs
myst build --html --ciwith the appropriateBASE_URL - Serves the static HTML from
<project-path>/_build/html/
- Checks if
-
The extension uses path-based routing to ensure all assets and navigation links work correctly with the
/myst-build/<project-path>/prefix.
Requirements
jupyter-server-proxy>= 4.1.0mystmd(MyST Markdown CLI tool)
Project Structure
jupyter-myst-build-proxy/
├── jupyter_myst_build_proxy/
│ ├── __init__.py # Main extension setup
│ ├── static_server.py # HTTP server for serving MyST sites
│ ├── building.html # Building status template
│ ├── directory_browser.html # Directory browser template
│ └── logo-square.svg # MyST logo
├── tests/ # pytest tests
├── setup.py # Package configuration
└── README.md # This file
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jupyter_myst_build_proxy-0.5.0.tar.gz.
File metadata
- Download URL: jupyter_myst_build_proxy-0.5.0.tar.gz
- Upload date:
- Size: 96.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0225e7757747ae228c32f36a0136603364ce2067319769bd37f5504f95709f47
|
|
| MD5 |
807e5123fc887d6e5fd1ae3ca223f9d4
|
|
| BLAKE2b-256 |
d4a3e8950a9e36aa30bcf7d81f0dea27bb1046bc6f2398975f84694fc4c29eb4
|
Provenance
The following attestation bundles were made for jupyter_myst_build_proxy-0.5.0.tar.gz:
Publisher:
publish.yml on ryanlovett/jupyter-myst-build-proxy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jupyter_myst_build_proxy-0.5.0.tar.gz -
Subject digest:
0225e7757747ae228c32f36a0136603364ce2067319769bd37f5504f95709f47 - Sigstore transparency entry: 707997134
- Sigstore integration time:
-
Permalink:
ryanlovett/jupyter-myst-build-proxy@467aad661667eb794e1608199a933e5932ea2a45 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/ryanlovett
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@467aad661667eb794e1608199a933e5932ea2a45 -
Trigger Event:
release
-
Statement type:
File details
Details for the file jupyter_myst_build_proxy-0.5.0-py3-none-any.whl.
File metadata
- Download URL: jupyter_myst_build_proxy-0.5.0-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79d02138e49fc3fcde6ce9020119710c2b94fbb4a2c5ebff51914f535fb0805b
|
|
| MD5 |
3b0ec9320ef158c411d0dec52af2f2d8
|
|
| BLAKE2b-256 |
1e064aa1f57a4ee27a6158719fd7ffde6f67e9aef43f24568065626517507b17
|
Provenance
The following attestation bundles were made for jupyter_myst_build_proxy-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on ryanlovett/jupyter-myst-build-proxy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jupyter_myst_build_proxy-0.5.0-py3-none-any.whl -
Subject digest:
79d02138e49fc3fcde6ce9020119710c2b94fbb4a2c5ebff51914f535fb0805b - Sigstore transparency entry: 707997135
- Sigstore integration time:
-
Permalink:
ryanlovett/jupyter-myst-build-proxy@467aad661667eb794e1608199a933e5932ea2a45 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/ryanlovett
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@467aad661667eb794e1608199a933e5932ea2a45 -
Trigger Event:
release
-
Statement type: