Allow the use of a custom overrides.json
file for configuring JupyterLite at runtime
#225
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a configuration option in
conf.py
calledjupyterlite_overrides
. This option modifies the command used to build JupyterLite internally withinjupyterlite-sphinx
to use a user-providedoverrides.json
file.Rationale
overrides.json
file in thedocs/
directory, similar toipycanvas
's documentation, which will automatically be picked up byjupyterlite-sphinx
(and thereby JupyterLite) when building the JupyterLite site.jupyterlite-sphinx
can benefit from the flexibility of using a custom override file with the docs, which is possible if one has access to the JupyterLite build command with ease.This option is already available via https://jupyterlite-sphinx.readthedocs.io/en/latest/configuration.html#additional-cli-arguments-for-jupyter-lite-build, which was established via Pass additional configuration options to the
jupyter lite build
command #169. Still, that approach has been directed mostly towards advanced users, and having this feature exposed through a configuration option similar to one for a build-time configuration file would make it easier to use and make it more visible with the rest of the options in the docs.Additional context
Please see jupyterlite/jupyterlite#385 (comment), which is where I got this idea. Some possible use cases for this can be: