WIP add favourites

This commit is contained in:
Tom van Woudenberg 2025-09-14 09:08:58 +02:00
parent 1cbb112432
commit 77da9807d2
2 changed files with 37 additions and 1 deletions

View file

@ -0,0 +1,28 @@
````{margin}
```{admonition} User types
:class: tip
This page is useful for user type 3-5.
```
{bdg-primary}`Sphinx Extension`
```
````
# TeachBooks Favourites
TeachBooks Favourites is a Sphinx extension which collects all of TeachBooks' favourite features in one place (including tools originally by TeachBooks and from other sources). It is included by default in the [TeachBooks Template](../external/template/README.md) and can be installed independently using `pip install teachbooks-favourites`. The features included are:
- [Sphinx-Thebe from TeachBooks](./live_code.ipynb)
- [Jupyterbook patches](../external/jupyterbook-patches/README.md)
- [Download link replacer](../external/download-link-replacer/README.md)
- [Sphinx image inverter](../external/sphinx-image-inverter/README.md)
- [Sphinx iframes](../external/sphinx-iframes/README.md)
- [Sphinx exercise (TeachBooks contribution to the original)](https://ebp-sphinx-exercise.readthedocs.io/en/latest/)
- [Teachbooks Sphinx tippy](../external/teachbooks-sphinx-tippy/README.html)
- [Sphinx named colors](../external/sphinx-named-colors/README.md)
- [Sphinx dropdown toggle](../_git/github.com_TeachBooks_Sphinx-Dropdown-Toggle/main/MANUAL.md)
- [Sphinx proof (TeachBooks contribution to the original)](https://sphinx-proof.readthedocs.io/en/latest/)
- [Sphinx code examples](../_git/github.com_TeachBooks_sphinx-code-examples/main/MANUAL.md)
- [Sphinx accessibility](../_git/github.com_TeachBooks_Sphinx-Accessibility/manual/README.html)
- [Sphinx toggle button (TeachBooks contribution to the original)](https://sphinx-togglebutton.readthedocs.io/en/latest/)

View file

@ -19,6 +19,7 @@ Additionally, not all features are built and shared in the same way. We do our b
- {bdg-light}`GitHub Template`
- {bdg-dark}`Git Workflow`
- {bdg-primary}`Sphinx Extension`
- {bdg-primary-line}`Part of TeachBooks Favourites`
- {bdg-danger}`iframe`
- {bdg-success}`WebApp`
@ -26,7 +27,7 @@ Finally, the purpose, installation process and usage of each features is elabora
To see examples for these features, go to the [Examples chapter](../examples/overview.md).
As the TeachBooks Python Package and the Deploy Book Workflow are important tools that incorporate and deploy more than one feature, an additional explanation is provided on this page in more detail, with links to the pages in this manual where individual features are described.
As the TeachBooks Python Package, the Deploy Book Workflow and TeachBooks Favourites are important tools that incorporate and deploy more than one feature, an additional explanation is provided on this page in more detail, with links to the pages in this manual where individual features are described.
(teachbooks_package)=
## TeachBooks Python Package
@ -81,11 +82,13 @@ Important for these features:
### Book Build Commands
By default the DBW builds books using the following command:
```
teachbooks build book/
```
To use the [Draft-Release Workflow](./draft-release.md) with the Deploy Book Workflow the `BRANCHES_TO_PREPROCESS` variable must be configured for a specific branch, which will then execute the following command:
```
teachbooks build --release book/
```
@ -97,3 +100,8 @@ As described on the [DBW page](../external/deploy-book-workflow/README.md), ther
Note that Specifying package version numbers explicitly and updating them via [Dependabot](./update_env.md) is an excellent way to ensure that environments in the DBW are always up to date and this issue is avoided.
If you are _not_ using Dependabot and are not able to get your packages updated when the DBW is running, delete the cache manually and rerun your GitHub Actions job (go to Actions tab, then looking for the "Caches" section under the "Management" pane on the left hand side of the screen).
(teachbooks-favourites-intro)=
## TeachBooks Favourites
The [TeachBooks Favourites](./favourites.md) is a sphinx extension which collects all of TeachBooks favourite features in one place. It is included by default in the [TeachBooks Template](../external/template/README.md). All features which are part of TeachBooks Favourites are indicated with {bdg-primary-line}`Part of TeachBooks Favourites`. If you'd like ot use specific features, but not the entire TeachBooks Favourites, you can remove this extension and replace it with the individual extensions you want to use.