From 62b30a560b64901259b953e398e22b53d85c56b0 Mon Sep 17 00:00:00 2001 From: Dennis den Ouden-van der Horst Date: Thu, 28 Aug 2025 11:51:18 +0200 Subject: [PATCH] Replace individual Sphinx extensions with favourites package Consolidated multiple Sphinx extension dependencies into the 'teachbooks_favourites' package in both _config.yml and requirements.txt. This simplifies configuration and dependency management by using a single package that includes the preferred extensions. --- book/_config.yml | 14 ++------------ requirements.txt | 15 +++------------ 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/book/_config.yml b/book/_config.yml index a3a8f15..00509ad 100644 --- a/book/_config.yml +++ b/book/_config.yml @@ -40,18 +40,8 @@ sphinx: # Options passed on to the chtml: { mtextInheritFont: true # To typeset text within math prettier } - extra_extensions: # Gives you a starter package of extensions to use in your book - - jupyterbook_patches # Various patches by TeachBooks: https://github.com/TeachBooks/JupyterBook-Patches - - download_link_replacer # Allows you to replace and add downloadable files to a page header: https://teachbooks.io/manual/external/Download-Link-Replacer/README.html - - sphinx_image_inverter # Inverts images for dark mode: https://teachbooks.io/manual/external/Sphinx-Image-Inverter/README.html - - sphinx_iframes # Eases the embedding of iframes: https://teachbooks.io/manual/external/sphinx-iframes/README.html - - sphinx_exercise # Allows you to add exercise boxes to your book: https://ebp-sphinx-exercise.readthedocs.io/en/latest/ - - teachbooks_sphinx_tippy # Enables hoover over tips: https://teachbooks.io/manual/external/teachbooks-sphinx-tippy/README.html - - sphinx_named_colors # Allows you to use custom colors in your book: https://teachbooks.io/manual/external/Sphinx-Named-Colors/README.html - - sphinx_dropdown_toggle # Adds a button to toggle all dropdowns with one click - - sphinx_proof # Allows you to add various mathy admonitions to your book: https://sphinx-proof.readthedocs.io/en/latest/ - - sphinx_code_examples # Allows you to include code blocks in examples: https://teachbooks.io/manual/_git/github.com_TeachBooks_sphinx-code-examples/main/MANUAL.html - - sphinx_accessibility # Allows dyslexic-friendly fonts and high contrast mode: https://teachbooks.io/manual/accessibility/_git/github.com_TeachBooks_Sphinx-Accessibility/manual/README.html + extra_extensions: + - teachbooks_favourites # Gives you a starter package of extensions to use in your book bibtex_bibfiles: - references.bib # Required for references diff --git a/requirements.txt b/requirements.txt index 91b3dc4..faa7636 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,17 +1,8 @@ # first list the packages you wish to download from PyPI teachbooks # depends on jupyter-book -jupyterbook-patches -sphinx-image-inverter -download_link_replacer -git+https://github.com/TeachBooks/sphinx-exercise #waiting for merge of https://github.com/executablebooks/sphinx-exercise/pull/75, after, replace this line with `sphinx-exercise` -teachbooks-sphinx-tippy -sphinx-iframes -sphinx-named-colors -sphinx_dropdown_toggle -git+https://github.com/TeachBooks/sphinx-togglebutton #waiting for merge of https://github.com/executablebooks/sphinx-togglebutton/pull/66, after, replace this line with `sphinx-dropdown-toggle` -git+https://github.com/TeachBooks/sphinx-proof #waiting for merge of https://github.com/executablebooks/sphinx-proof/pull/146, after, replace this line with `sphinx-proof` -sphinx-code-examples -sphinx-accessibility + +# Our favourite Sphinx extensions in one line +git+https://github.com/TeachBooks/TeachBooks-Favourites # Now list the packages you want to download directly from GitHub git+https://github.com/TeachBooks/Sphinx-Thebe