From 0c00a4cdcea81ccf528e6512b451ba9180fd621b Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Tue, 27 Feb 2024 10:00:11 +0100 Subject: [PATCH] Add interactivity with sphinx-thebe --- book/_config.yml | 13 ++++++++++++- requirements.txt | 8 +++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/book/_config.yml b/book/_config.yml index 4273941..6a3e5a7 100644 --- a/book/_config.yml +++ b/book/_config.yml @@ -3,11 +3,22 @@ author: Caspar Jungbacker logo: images/TUDelft_logo_rgb.png execute: - execute_notebooks: auto + execute_notebooks: 'off' + +launch_buttons: + thebe: true sphinx: extra_extensions: - sphinx_inline_tabs - jupyterlite_sphinx + - sphinx.ext.imgconverter + - download_link_replacer + - jupyterbook_patches config: jupyterlite_config: jupyterlite-config.json + html_js_files: + - https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js + thebe_config: + use_thebe_lite: true + exclude_patterns: ["**/_*.yml", "**/*.md", "**/*.ipynb"] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 2c544df..a3dc6e5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,10 @@ jupyter-book sphinx-inline-tabs jupyterlite-xeus-python -jupyterlite-sphinx \ No newline at end of file +jupyterlite-sphinx + +--extra-index-url https://gitlab.tudelft.nl/api/v4/projects/11239/packages/pypi/simple +sphinx-thebe == 0.2.1000 +--extra-index-url https://gitlab.tudelft.nl/api/v4/projects/17983/packages/pypi/simple +jupyterbook_patches == 0.1.2 +download_link_replacer @ git+https://gitlab.tudelft.nl/mude/sphinx-download-link-replacer@dlr-0.1.2