From 2575a65e9f02d5d90f0885acb695301e39a4ac93 Mon Sep 17 00:00:00 2001
From: mmcky <mmcky@users.noreply.github.com>
Date: Tue, 28 Feb 2023 10:44:41 +1100
Subject: [PATCH] UPGRADE: `myst-nb` and many other dependencies (#1842)
This PR updates `jupyter-book` to enable `myst-nb~=0.17.1` and `sphinx5` support. It also includes new versions of `sphinx-design`, `sphinx-thebe`, and `sphinx-book-theme`
---
.github/workflows/tests.yml | 4 +-
CHANGELOG.md | 2 +-
docs/_config.yml | 14 +-
docs/_toc.yml | 1 +
docs/content/code-outputs.md | 39 ++-
docs/content/content-blocks.md | 61 ++---
docs/content/executable/output-insert.md | 26 +-
docs/content/execute.md | 24 +-
docs/content/figures.md | 2 +-
docs/content/references.md | 2 +-
docs/contribute/intro.md | 2 +-
docs/explain/migration.md | 245 ++++++++++++++++++
docs/publish/readthedocs.md | 5 +-
docs/reference/cheatsheet.md | 2 +-
jupyter_book/__init__.py | 2 +-
jupyter_book/cli/main.py | 5 -
jupyter_book/config.py | 22 +-
jupyter_book/config_schema.json | 9 +-
jupyter_book/default_config.yml | 3 +-
pyproject.toml | 12 +-
.../extension/mycustomextension.py | 34 +--
tests/test_build.py | 8 +-
tests/test_build/_toc_numbered.sphinx4.html | 6 +-
tests/test_build/_toc_numbered.sphinx5.html | 46 ++++
.../_toc_numbered_depth.sphinx4.html | 6 +-
.../_toc_numbered_depth.sphinx5.html | 46 ++++
...c_numbered_depth_parts_subset.sphinx4.html | 6 +-
...c_numbered_depth_parts_subset.sphinx5.html | 65 +++++
.../_toc_numbered_parts.sphinx4.html | 6 +-
.../_toc_numbered_parts.sphinx5.html | 58 +++++
.../_toc_numbered_parts_subset.sphinx4.html | 6 +-
.../_toc_numbered_parts_subset.sphinx5.html | 65 +++++
tests/test_config.py | 3 +-
.../test_config_sphinx_command.txt | 14 +-
...ig_sphinx_command_only_build_toc_files.txt | 14 +-
...et_final_config_custom_myst_extensions.yml | 16 +-
.../test_get_final_config_empty_.yml | 16 +-
...est_get_final_config_exclude_patterns_.yml | 16 +-
.../test_get_final_config_execute_method_.yml | 16 +-
...test_get_final_config_extended_syntax_.yml | 16 +-
...st_get_final_config_html_extra_footer_.yml | 16 +-
.../test_get_final_config_latex_doc_.yml | 16 +-
.../test_get_final_config_launch_buttons_.yml | 16 +-
.../test_get_final_config_repository_.yml | 16 +-
.../test_get_final_config_sphinx_default_.yml | 16 +-
.../test_get_final_config_sphinx_recurse_.yml | 16 +-
.../test_get_final_config_title_.yml | 16 +-
.../test_mathjax_config_warning.sphinx4.yml | 16 +-
.../test_mathjax_config_warning.sphinx5.yml | 88 +++++++
...ax_config_warning_mathjax2path.sphinx4.yml | 16 +-
...ax_config_warning_mathjax2path.sphinx5.yml | 90 +++++++
...epth_multitoc_numbering_false.sphinx4.html | 6 +-
...epth_multitoc_numbering_false.sphinx5.html | 46 ++++
...bset_multitoc_numbering_false.sphinx4.html | 6 +-
...bset_multitoc_numbering_false.sphinx5.html | 65 +++++
...ered_multitoc_numbering_false.sphinx4.html | 6 +-
...ered_multitoc_numbering_false.sphinx5.html | 46 ++++
...arts_multitoc_numbering_false.sphinx4.html | 6 +-
...arts_multitoc_numbering_false.sphinx5.html | 58 +++++
...bset_multitoc_numbering_false.sphinx4.html | 6 +-
...bset_multitoc_numbering_false.sphinx5.html | 65 +++++
.../test_toc_parts_directive.sphinx5.html | 21 ++
.../test_toc_parts_sidebar.sphinx4.html | 41 +--
.../test_toc_parts_sidebar.sphinx5.html | 97 +++++++
tox.ini | 3 +-
65 files changed, 1444 insertions(+), 295 deletions(-)
create mode 100644 docs/explain/migration.md
create mode 100644 tests/test_build/_toc_numbered.sphinx5.html
create mode 100644 tests/test_build/_toc_numbered_depth.sphinx5.html
create mode 100644 tests/test_build/_toc_numbered_depth_parts_subset.sphinx5.html
create mode 100644 tests/test_build/_toc_numbered_parts.sphinx5.html
create mode 100644 tests/test_build/_toc_numbered_parts_subset.sphinx5.html
create mode 100644 tests/test_config/test_mathjax_config_warning.sphinx5.yml
create mode 100644 tests/test_config/test_mathjax_config_warning_mathjax2path.sphinx5.yml
create mode 100644 tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_multitoc_numbering_false.sphinx5.html
create mode 100644 tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_parts_subset_multitoc_numbering_false.sphinx5.html
create mode 100644 tests/test_sphinx_multitoc_numbering/_toc_numbered_multitoc_numbering_false.sphinx5.html
create mode 100644 tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_multitoc_numbering_false.sphinx5.html
create mode 100644 tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_subset_multitoc_numbering_false.sphinx5.html
create mode 100644 tests/test_tocdirective/test_toc_parts_directive.sphinx5.html
create mode 100644 tests/test_tocdirective/test_toc_parts_sidebar.sphinx5.html
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index f64c6ef1..129aec62 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -87,7 +87,7 @@ jobs:
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9"]
- sphinx: [">=4,<5"]
+ sphinx: [">=4,<5", ">=5,<6"]
steps:
- uses: actions/checkout@v3
@@ -100,8 +100,8 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install wheel
- pip install "sphinx${{ matrix.sphinx }}"
pip install -e .[testing]
+ pip install "sphinx${{ matrix.sphinx }}"
- name: Install Headless Chrome dependencies
run: |
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2380b34c..8559b9bf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -339,7 +339,7 @@ This release includes a number of new features, improvements and bug fixes. Ther
* 👌 IMPROVE: Option to exclude every file not in the toc. ([docs](docs/customize/config.md), [#1123](https://github.com/executablebooks/jupyter-book/pull/1123), [@alex-treebeard](https://github.com/alex-treebeard))
* ✨ NEW: Enable the use of local Sphinx extension via _config.yml. ([docs](docs/customize/config.md), [#1102](https://github.com/executablebooks/jupyter-book/pull/1102), [@mmcky](https://github.com/mmcky))
* ✨ NEW: Enable custom builder passthrough. This is an **advanced feature**
- that enables the use of additional sphinx builders via jupyter-book that may be provided by an extension. ([docs](docs/advanced/sphinx.md), [#1094]([#1094](https://github.com/executablebooks/jupyter-book/pull/1094)), [@mmcky](https://github.com/mmcky))
+ that enables the use of additional sphinx builders via jupyter-book that may be provided by an extension. ([docs](docs/advanced/sphinx.md), [#1094](https://github.com/executablebooks/jupyter-book/pull/1094), [@mmcky](https://github.com/mmcky))
**HTML:**
diff --git a/docs/_config.yml b/docs/_config.yml
index e8396778..a849ed4d 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -15,6 +15,9 @@ bibtex_bibfiles:
execute:
execute_notebooks: cache
+ stderr_output: "remove"
+ allow_errors: true
+ timeout: 120
html:
announcement: "âš ï¸The latest release refactored our HTML, so double-check your custom CSS rules!âš ï¸"
@@ -25,6 +28,8 @@ html:
use_repository_button: true
use_issues_button: true
baseurl: https://jupyterbook.org/
+ analytics:
+ google_analytics_id = ''
repository:
url: https://github.com/executablebooks/jupyter-book
@@ -60,9 +65,13 @@ latex:
sphinx:
config:
bibtex_reference_style: author_year # or label, super, \supercite
+ # unknown_mime_type - application/vnd.plotly.v1+json and application/vnd.bokehjs_load.v0+json
+ # domains - sphinx_proof.domain::prf needs to have `resolve_any_xref` method
+ # mime_priority - latex priority not set in myst_nb for text/html, application/javascript
+ suppress_warnings: ["mystnb.unknown_mime_type", "myst.domains", "mystnb.mime_priority"]
copybutton_prompt_text: "$"
- execution_show_tb: True
- execution_timeout: 120
+ nb_execution_show_tb: True
+ nb_execution_timeout: 120
html_extra_path:
- images/badge.svg
intersphinx_mapping:
@@ -114,6 +123,7 @@ sphinx:
content-types/jupytext.md: file-types/jupytext.Rmd
content-types/restructuredtext.md: file-types/restructuredtext.md
customize/toc.md: structure/toc.md
+ sd_fontawesome_latex: True
extra_extensions:
diff --git a/docs/_toc.yml b/docs/_toc.yml
index 4c8c4da9..22392245 100644
--- a/docs/_toc.yml
+++ b/docs/_toc.yml
@@ -96,5 +96,6 @@ parts:
title: Gallery of Jupyter Books
- file: explain/components
- file: cite
+ - file: explain/migration
- file: reference/_changelog
title: Change log
diff --git a/docs/content/code-outputs.md b/docs/content/code-outputs.md
index e24c9c0b..611ff0f0 100644
--- a/docs/content/code-outputs.md
+++ b/docs/content/code-outputs.md
@@ -93,6 +93,18 @@ for ii in range(40):
print(f"this is output line {ii}")
```
+When writing MyST markdown documents you may use `:tags: ["output_scroll"]` as an option
+to the `code-cell` directive such as:
+
+````
+```{code-cell} ipython3
+:tags: [output_scroll]
+
+for ii in range(40):
+ print(f"this is output line {ii}")
+```
+````
+
(content:code-outputs:images)=
## Images
@@ -115,7 +127,7 @@ We can also set a caption (which is rendered as [CommonMark](https://commonmark.
````md
```{code-cell} ipython3
---
-render:
+mystnb:
image:
width: 200px
alt: fun-fish
@@ -134,7 +146,7 @@ produces the following code cell and figure:
```{code-cell} ipython3
---
-render:
+mystnb:
image:
width: 300px
alt: fun-fish
@@ -234,15 +246,16 @@ For example, this is the default priority list for HTML:
```yaml
sphinx:
config:
- nb_render_priority:
- html:
- - "application/vnd.jupyter.widget-view+json"
- - "application/javascript"
- - "text/html"
- - "image/svg+xml"
- - "image/png"
- - "image/jpeg"
- - "text/markdown"
- - "text/latex"
- - "text/plain"
+ nb_mime_priority_overrides: [
+ ['html', 'application/vnd.jupyter.widget-view+json', 10],
+ ['html', 'application/javascript', 20],
+ ['html', 'text/html', 30],
+ ['html', 'image/svg+xml', 40],
+ ['html', 'image/png', 50],
+ ['html', 'image/gif', 60],
+ ['html', 'image/jpeg', 70],
+ ['html', 'text/markdown', 80],
+ ['html', 'text/latex', 90],
+ ['html', 'text/plain', 100]
+ ]
```
diff --git a/docs/content/content-blocks.md b/docs/content/content-blocks.md
index ca556d5d..ad82b211 100644
--- a/docs/content/content-blocks.md
+++ b/docs/content/content-blocks.md
@@ -1,18 +1,19 @@
---
-substitutions:
- key1: "I'm a **substitution**"
- key2: |
- ```{note}
- {{ key1 }}
- ```
- fishy: |
- ```{image} /images/fun-fish.png
- :alt: fishy
- :width: 200px
- ```
- jinja: "[Jinja templates](https://jinja.palletsprojects.com/en/2.11.x/)"
- repo_name: "jupyter-book"
- repo_url: "[my repo url](https://github.com/executablebooks/jupyter-book)"
+myst:
+ substitutions:
+ key1: "I'm a **substitution**"
+ key2: |
+ ```{note}
+ {{ key1 }}
+ ```
+ fishy: |
+ ```{image} /images/fun-fish.png
+ :alt: fishy
+ :width: 200px
+ ```
+ jinja: "[Jinja templates](https://jinja.palletsprojects.com/en/2.11.x/)"
+ repo_name: "jupyter-book"
+ repo_url: "[my repo url](https://github.com/executablebooks/jupyter-book)"
---
# Special content blocks
@@ -166,7 +167,7 @@ You can use this syntax for any kind of directive, though it is generally recomm
### Insert code cell outputs into admonitions
If you'd like to insert the outputs of running code *inside* admonition
-blocks, we recommend using [`glue` functionality](content:code-outputs:glue).
+blocks, we recommend using [`glue` functionality](content:executable:output-insert).
For example, we'll insert one of the outputs that was glued into the book from the [code outputs page](./code-outputs.md).
For example:
@@ -176,12 +177,13 @@ For example:
```{note}
Here's my figure:
-```{glue:figure} sorted_means_fig
+```{glue} sorted_means_fig
+:doc: executable/output-insert.md
```
````
-See [](content:code-outputs:glue) for more information on how to use `glue` to insert your outputs directly into your content.
+See [](content:executable:output-insert) for more information on how to use `glue` to insert your outputs directly into your content.
:::{tip}
To hide code input and output that generated the variable you are inserting, use the `remove_cell` tag.
@@ -470,17 +472,18 @@ To use a substitution, first add front-matter content to the top of a page like
````yaml
---
-substitutions:
- key1: "I'm a **substitution**"
- key2: |
- ```{note}
- {{ key1 }}
- ```
- fishy: |
- ```{image} img/fun-fish.png
- :alt: fishy
- :width: 200px
- ```
+myst:
+ substitutions:
+ key1: "I'm a **substitution**"
+ key2: |
+ ```{note}
+ {{ key1 }}
+ ```
+ fishy: |
+ ```{image} img/fun-fish.png
+ :alt: fishy
+ :width: 200px
+ ```
---
````
@@ -521,7 +524,7 @@ These substitutions will be available throughout your book. For example, the glo
### Formatting substitutions
-MyST substitutions use {{ jinja }} in order to substite in key / values. This means that you can apply any standard Jinja formatting to your substitutions. For example, you can **replace text in your substitutions** like so:
+MyST substitutions use {{ jinja }} in order to substitute in key / values. This means that you can apply any standard Jinja formatting to your substitutions. For example, you can **replace text in your substitutions** like so:
```{example}
The original key1: {{ key1 }}
diff --git a/docs/content/executable/output-insert.md b/docs/content/executable/output-insert.md
index 14eafc40..e6f89718 100644
--- a/docs/content/executable/output-insert.md
+++ b/docs/content/executable/output-insert.md
@@ -9,21 +9,31 @@ kernelspec:
name: python3
---
-(content:code-outputs:glue)=
+(content:executable:output-insert)=
# Store code outputs and insert into content
You often wish to run analyses in one notebook and insert them in your
documents elsewhere. For example, if you'd like to include a figure,
or if you want to cite an analysis that you have run.
-```{margin}
+```{warning}
Currently, `glue` only works with Python.
```
+```{seealso}
+There have been changes in `jupyter-book>=0.14` in the way `glue`
+works. Please [see this page for more details](explain:migration).
+
+One of the major updates is that `glue` references between documents
+now require to use `:doc:`. An example is [available here](explain:migration:glue)
+
+```
+
The `glue` tool from [MyST-NB](https://myst-nb.readthedocs.io/)
allows you to add a key to variables in a notebook,
-then display those variables in your book by referencing the key. It
-follows a two-step process:
+then display those variables in your book by referencing the key.
+
+It follows a two-step process:
* **Glue a variable to a name**. Do this by using
the `myst_nb.glue` function on a variable
@@ -39,8 +49,6 @@ We'll cover each step in more detail below.
For more information about roles, see [](../myst.md).
:::
-+++
-
(glue/gluing)=
## Gluing variables in your notebook
@@ -61,15 +69,13 @@ You can then insert it into your text. Adding
`` {glue:}`cool_text` `` to your content results in the
following: {glue:}`cool_text`.
-### Gluing numbers, plots, and tables
+### Gluing numbers, plots, math, and tables
-You can glue anything in your notebook and display it later with `{glue:}`. Here
+You can glue anything in your notebook (or page) and display it later with `{glue:}`. Here
we'll show how to glue and paste **numbers and images**. We'll simulate some
data and run a simple bootstrap on it. We'll hide most of this process below,
to focus on the glueing part.
-+++
-
```{code-cell} ipython3
:tags: [hide-cell]
diff --git a/docs/content/execute.md b/docs/content/execute.md
index cd4bb8d6..e365221c 100644
--- a/docs/content/execute.md
+++ b/docs/content/execute.md
@@ -36,6 +36,16 @@ execute:
execute_notebooks: auto
```
+or equivalently:
+
+```yaml
+sphinx:
+ config:
+ nb_execution_mode: auto
+```
+
+Both of the above configurations are global, for per-file use `execution_mode` key.
+
This will only execute notebooks that are missing at least one output.
If the notebook has *all* of its outputs populated, then it will not be executed.
@@ -43,7 +53,8 @@ If the notebook has *all* of its outputs populated, then it will not be executed
above configuration value to:
```yaml
-execute_notebooks: force
+execute:
+ execute_notebooks: force
```
**To cache execution outputs with [jupyter-cache]**, change the above configuration
@@ -56,6 +67,15 @@ execute:
See {ref}`execute/cache` for more information.
+**To execute notebooks inline during parsing**, change the above configuration value to:
+
+```yaml
+execute:
+ execute_notebooks: inline
+```
+
+See [Inline variable evaluation (eval)](https://myst-nb.readthedocs.io/en/latest/render/inline.html#render-eval) for more information.
+
**To turn off notebook execution**, change the above configuration value to:
```yaml
@@ -333,7 +353,7 @@ Enable activate execution tracebacks, in your `_config.yml`:
```yaml
sphinx:
config:
- execution_show_tb: True
+ nb_execution_show_tb: True
```
See [the MyST-NB documentation](https://myst-nb.readthedocs.io) for more information.
diff --git a/docs/content/figures.md b/docs/content/figures.md
index ce25b4b1..df3bd6b3 100644
--- a/docs/content/figures.md
+++ b/docs/content/figures.md
@@ -134,7 +134,7 @@ Here is my figure caption!
:::{note}
You can also include figures that were generated by your code in notebooks.
-To do so, see [](content:code-outputs:glue).
+To do so, see [](content:executable:output-insert).
:::
## Markdown figures
diff --git a/docs/content/references.md b/docs/content/references.md
index 9c161912..a2d35614 100644
--- a/docs/content/references.md
+++ b/docs/content/references.md
@@ -179,7 +179,7 @@ Then, you may use the `{numref}` role in the same way that you use it for Figure
If you wish to use Markdown style syntax, then MyST Markdown will try to find a reference from any of the above reference types (and more!).
-This has an advantage, in that you can used nested markdown syntax in your text, for example:
+This has an advantage, in that you can use nested markdown syntax in your text, for example:
```{example}
diff --git a/docs/contribute/intro.md b/docs/contribute/intro.md
index 9fd1991a..e86da42a 100644
--- a/docs/contribute/intro.md
+++ b/docs/contribute/intro.md
@@ -174,7 +174,7 @@ what kinds of functionality they support:
{term}`the MyST-Parser<MyST-Parser>`.
* {term}`The MyST-NB package<MyST-NB>` parses Jupyter Notebooks into Sphinx and also
controls some parts of notebook execution.
- It also allows [inserting code outputs into content](content:code-outputs:glue).
+ It also allows [inserting code outputs into content](content:executable:output-insert).
* {term}`Jupyter-Cache` manages the execution and cacheing of notebook content at
build time. It is controlled by {term}`MyST-NB`.
* The {term}`Sphinx Book Theme` defines the look and feel of Jupyter Book, and is
diff --git a/docs/explain/migration.md b/docs/explain/migration.md
new file mode 100644
index 00000000..ac8b72d7
--- /dev/null
+++ b/docs/explain/migration.md
@@ -0,0 +1,245 @@
+(explain:migration)=
+# Migrating to `jupyter-book>=0.14`
+
+This release of `jupyter-book>=0.14` includes major updates to [myst-nb](https://myst-nb.readthedocs.io/en/latest/)
+and [myst-parser](https://myst-parser.readthedocs.io/en/latest/) that include some **breaking changes**.
+
+This update includes incorporating three major updates to [myst-nb](https://github.com/executablebooks/myst-nb) moving from `myst-nb~=0.13.1` to `myst-nb~=0.17.1`
+which incporates changes to the underlying [myst-parser](https://github.com/executablebooks/myst-parser) moving from `myst-parser~=0.15` to `myst-parser~=0.18`.
+
+While every effort has been made to enable backward compatibility there are some new warnings
+that may appear when upgrading to the latest version. This page has been put together to help explain
+these warnings and provides suggestions on how to fix them.
+
+The latest configuration options are well documented in the underlying libraries:
+
+1. [myst-nb configuration](https://myst-nb.readthedocs.io/en/latest/configuration.html)
+2. [myst-parser configuration](https://myst-parser.readthedocs.io/en/latest/configuration.html)
+
+so it is worth referring to these resources when updating any options or using more advacned features in your project.
+
+## Common Configuration Updates
+
+A number of configuration option names have been updated.
+
+Some of the more commonly used options include those that control execution of `jupyter` notebooks.
+The majority of options concerning notebooks have an `nb_` prefix added to the pre-existing option name,
+however there are some cases where the option name has been changed.
+
+For example `jupyter_execute_notebooks` has become `nb_execution_mode`. Most of the old option
+names will be auto-converted and a warning is issued by [myst-nb](https://github.com/executablebooks/myst-nb) such as:
+
+```
+WARNING: 'jupyter_execute_notebooks' is deprecated for 'nb_execution_mode' [mystnb.config]
+```
+
+These warning messages now includes the software that is responsible as seen in the square brackets.
+This helps to identify where your warning is coming from and using the [myst-nb](https://github.com/executablebooks/myst-nb)
+documentation may be a good source of information.
+
+Below we highlight some of the configuration changes here, which we found useful when updating our range
+projects. It should be noted that these are only a handful of examples, please refer to the doc links
+mentioned above [raise an issue](https://github.com/executablebooks/jupyter-book/issues).
+
+### Book level configuration
+
+Some of the configurations have been renamed, and the variable types of some have also been changed.
+
+The noteworthy configuration changes which effected most of our projects were:
+
+1. `jupyter_execute_notebooks` is renamed to `nb_execution_mode`.
+2. `nb_render_priority` is renamed to `nb_mime_priority_overrides` and it accepts a sequence of tuples.
+ Each tuple takes three mandatory entries namely `builder name`, `mime type`, and `priority`.
+
+ An Example,
+
+ ```yaml
+ sphinx:
+ config:
+ nb_render_priority:
+ - "application/vnd.jupyter.widget-view+json"
+ - "application/javascript"
+ - "text/html"
+ - "text/latex"
+ - "image/svg+xml"
+ - "image/png"
+ - "image/jpeg"
+ - "text/markdown"
+ - "text/plain"
+ ```
+
+ would become
+
+ ```yaml
+ sphinx:
+ config:
+ nb_mime_priority_overrides: [
+ ['html', 'application/vnd.jupyter.widget-view+json', 10],
+ ['html', 'application/javascript', 20],
+ ['html', 'text/html', 30],
+ ['html', 'text/latex', 40],
+ ['html', 'image/svg+xml', 50],
+ ['html', 'image/png', 60],
+ ['html', 'image/jpeg', 70],
+ ['html', 'text/markdown', 80],
+ ['html', 'text/plain', 90],
+ ]
+ ```
+
+There are additional option name changes that should be notified to you via the `warnings` output.
+
+### Configuration pass-through (file level)
+
+If you wish to specify a configuration options that is processed by [myst-nb](https://github.com/executablebooks/myst-nb),
+overriding the **default configuration** now requires them to under the `mystnb` key. Likewise, if a configuration option is
+processed by [myst-parser](https://github.com/executablebooks/myst-parser), then they should be under the `myst` key.
+
+Some examples follow:
+
+#### myst-nb
+
+To set the `execution_timeout` config option managed by `mystnb` you would specify the following
+
+````md
+```
+---
+file_format: mystnb
+mystnb:
+ execution_timeout: 60
+---
+```
+````
+
+in the header of the notebook (or page).
+
+#### Myst-parser
+
+To make document level variables that will be resolved by [myst-parser](https://github.com/executablebooks/myst-parser)
+then this configuration can be specifed under the `myst` key in the configuration for each notebook (or page) such as:
+
+````md
+```
+---
+myst:
+ substitutions:
+ key1: "I'm a **substitution**"
+ key2: |
+ ```{note}
+ {{ key1 }}
+ ```
+ fishy: |
+ ```{image} /images/fun-fish.png
+ :alt: fishy
+ :width: 200px
+ ```
+ jinja: "[Jinja templates](https://jinja.palletsprojects.com/en/2.11.x/)"
+ repo_name: "jupyter-book"
+ repo_url: "[my repo url](https://github.com/executablebooks/jupyter-book)"
+---
+```
+````
+
+### Configuration pass-through (cell level)
+
+Similarly, overriding the default configuration can also be done at the cell level
+and requires them to be under the `mystnb` key.
+
+Since cell-level operations are in myst-nb domain, we don't have to worry about **Myst-parser** here.
+
+This changes the way configuration was previously captured under the `render` title, replacing it with `mystnb`.
+
+An example of the new configuration
+
+````md
+```{code-cell} ipython3
+---
+mystnb:
+ image:
+ width: 200px
+ alt: fun-fish
+ classes: shadow bg-primary
+ figure:
+ caption: |
+ Hey everyone its **party** time!
+ name: fun-fish
+---
+from IPython.display import Image
+Image("../images/fun-fish.png")
+```
+````
+
+Further [documentation of this feature is available here](myst-nb:render/output/images)
+
+(explain:migration:glue)=
+### Changes to `glue`
+
+```{tip}
+One of the key changes is that `glue` directives will now need to use `:doc:` to
+reference objects that are created in a **separate notebook (page or document)**.
+
+The `glue` behaviour is the same as previously **within the same** notebook (page or document)
+```
+
+The `glue` roles and directives will only identify keys in the same notebook, by **default**.
+To reference a glue object in another notebook (page or document), now requires you to use a `:doc:` key,
+which specifies the relative path to the notebook.
+
+An example:
+
+````md
+```{glue} cool_text
+:doc: /content/executable/output-insert.md
+```
+````
+
+will render as
+
+```{glue} cool_text
+:doc: /content/executable/output-insert.md
+```
+
+```{tip}
+The `file extension` of the document needs to be specified. So you need to use
+`executable/output-insert.md` rather than `executable/output-insert` as can be the case
+in some other `sphinx/docutils` directives
+```
+
+**DataFrames:**
+
+```{glue} df_tbl
+:doc: /content/executable/output-insert.md
+```
+
+#### Limitations for Figures and Math
+
+There are current limitations based on the `mime` types for `Figures` and `Math`
+
+**Math:**
+
+Using the `glue` directive between documents for math results in a text representation
+
+```{glue} sym_eq
+:doc: /content/executable/output-insert.md
+```
+
+**Figures:**
+
+Similary for Figures
+
+For example if you glue in the figure `sorted_means_fig` from the `executable/output-insert.md` document
+
+````md
+```{glue} sorted_means_fig
+:doc: /content/executable/output-insert.md
+```
+````
+
+will render as
+
+```{glue} sorted_means_fig
+:doc: /content/executable/output-insert.md
+```
+
+which is the text description of the image.
+
+These issues have been reported to the myst-nb team
diff --git a/docs/publish/readthedocs.md b/docs/publish/readthedocs.md
index 8af55f92..6865d0db 100644
--- a/docs/publish/readthedocs.md
+++ b/docs/publish/readthedocs.md
@@ -1,6 +1,7 @@
---
-substitutions:
- RTD: "[Read the Docs](https://readthedocs.org)"
+myst:
+ substitutions:
+ RTD: "[Read the Docs](https://readthedocs.org)"
---
# Read the Docs
diff --git a/docs/reference/cheatsheet.md b/docs/reference/cheatsheet.md
index a9cafbe5..a4ae83d7 100644
--- a/docs/reference/cheatsheet.md
+++ b/docs/reference/cheatsheet.md
@@ -1105,7 +1105,7 @@ To glue a math equation try:
:label: glue-eq-example
```
-See [](content:code-outputs:glue) for more information.
+See [](content:executable:output-insert) for more information.
## Reference documents
diff --git a/jupyter_book/__init__.py b/jupyter_book/__init__.py
index 0ffecfb0..85726489 100644
--- a/jupyter_book/__init__.py
+++ b/jupyter_book/__init__.py
@@ -1,6 +1,6 @@
"""Build a book with Jupyter Notebooks and Sphinx."""
-__version__ = "0.13.2"
+__version__ = "0.14.0"
# We connect this function to the step after the builder is initialized
diff --git a/jupyter_book/cli/main.py b/jupyter_book/cli/main.py
index 13603fcf..e44c90fc 100644
--- a/jupyter_book/cli/main.py
+++ b/jupyter_book/cli/main.py
@@ -217,7 +217,6 @@ def build(
config_overrides = {
"master_doc": PAGE_NAME,
"exclude_patterns": to_exclude,
- "html_theme_options": {"single_page": True},
# --individualpages option set to True for page call
"latex_individualpages": True,
}
@@ -255,10 +254,6 @@ def build(
else toc.as_posix()
)
- # Builder-specific overrides
- if builder == "pdfhtml":
- config_overrides["html_theme_options"] = {"single_page": True}
-
# --individualpages option passthrough
config_overrides["latex_individualpages"] = individualpages
diff --git a/jupyter_book/config.py b/jupyter_book/config.py
index 0b1b2569..c8dca917 100644
--- a/jupyter_book/config.py
+++ b/jupyter_book/config.py
@@ -282,9 +282,7 @@ def yaml_to_sphinx(yaml: dict):
sphinx_config[spx_key] = html[yml_key]
for spx_key, yml_key in [
- ("google_analytics_id", "google_analytics_id"),
("navbar_footer_text", "navbar_footer_text"),
- ("extra_navbar", "extra_navbar"),
# Deprecate navbar_footer_text after a release cycle
("extra_footer", "extra_footer"),
("home_page_in_toc", "home_page_in_navbar"),
@@ -293,6 +291,10 @@ def yaml_to_sphinx(yaml: dict):
if yml_key in html:
theme_options[spx_key] = html[yml_key]
+ for spx_key, yml_key in [("google_analytics_id", "google_analytics_id")]:
+ if yml_key in html:
+ theme_options["analytics"] = {}
+ theme_options["analytics"][spx_key] = html[yml_key]
# Pass through the buttons
btns = ["use_repository_button", "use_edit_page_button", "use_issues_button"]
use_buttons = {btn: html.get(btn) for btn in btns if btn in html}
@@ -343,20 +345,20 @@ def yaml_to_sphinx(yaml: dict):
execute = yaml.get("execute")
if execute:
for spx_key, yml_key in [
- ("execution_allow_errors", "allow_errors"),
- ("execution_in_temp", "run_in_temp"),
+ ("nb_execution_allow_errors", "allow_errors"),
+ ("nb_execution_in_temp", "run_in_temp"),
("nb_output_stderr", "stderr_output"),
- ("execution_timeout", "timeout"),
- ("jupyter_cache", "cache"),
- ("jupyter_execute_notebooks", "execute_notebooks"),
- ("execution_excludepatterns", "exclude_patterns"),
+ ("nb_execution_timeout", "timeout"),
+ ("nb_execution_cache_path", "cache"),
+ ("nb_execution_mode", "execute_notebooks"),
+ ("nb_execution_excludepatterns", "exclude_patterns"),
]:
if yml_key in execute:
sphinx_config[spx_key] = execute[yml_key]
- if sphinx_config.get("jupyter_execute_notebooks") is False:
+ if sphinx_config.get("nb_execution_mode") is False:
# Special case because YAML treats `off` as "False".
- sphinx_config["jupyter_execute_notebooks"] = "off"
+ sphinx_config["nb_execution_mode"] = "off"
# LaTeX
latex = yaml.get("latex")
diff --git a/jupyter_book/config_schema.json b/jupyter_book/config_schema.json
index a69a3349..421b0d0e 100644
--- a/jupyter_book/config_schema.json
+++ b/jupyter_book/config_schema.json
@@ -111,14 +111,13 @@
"use_issues_button": {
"type": "boolean"
},
- "extra_navbar": {
- "type": "string"
- },
"extra_footer": {
"type": "string"
},
- "google_analytics_id": {
- "type": "string"
+ "analytics": {
+ "google_analytics_id": {
+ "type": "string"
+ }
},
"home_page_in_navbar": {
"type": "boolean"
diff --git a/jupyter_book/default_config.yml b/jupyter_book/default_config.yml
index f790e4e4..8a6e743a 100644
--- a/jupyter_book/default_config.yml
+++ b/jupyter_book/default_config.yml
@@ -52,11 +52,12 @@ html:
use_repository_button : false # Whether to add a link to your repository button
use_issues_button : false # Whether to add an "open an issue" button
use_multitoc_numbering : true # Continuous numbering across parts/chapters
- extra_navbar : Powered by <a href="https://jupyterbook.org">Jupyter Book</a> # Will be displayed underneath the left navbar.
extra_footer : "" # Will be displayed underneath the footer.
google_analytics_id : "" # A GA id that can be used to track book views.
home_page_in_navbar : true # Whether to include your home page in the left Navigation Bar
baseurl : "" # The base URL where your book will be hosted. Used for creating image previews and social links. e.g.: https://mypage.com/mybook/
+ analytics:
+
comments:
hypothesis : false
utterances : false
diff --git a/pyproject.toml b/pyproject.toml
index a0e7897b..0f7f8242 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -29,20 +29,20 @@ dynamic = ["description", "version"]
requires-python = ">=3.7"
dependencies = [
"click>=7.1,<9",
- "docutils>=0.15,<0.18",
+ "docutils>=0.15,<0.19",
"Jinja2",
"jsonschema<5",
"linkify-it-py~=2.0.0",
- "myst-nb~=0.13.1",
+ "myst-nb~=0.17.1",
"pyyaml",
- "sphinx>=4,<5",
+ "sphinx>=4,<6",
"sphinx-comments",
"sphinx-copybutton",
- "sphinx-design~=0.1.0",
"sphinx-external-toc~=0.3.1",
"sphinx-jupyterbook-latex~=0.5.2",
- "sphinx-thebe~=0.2.1",
- "sphinx_book_theme~=0.3.2",
+ "sphinx-design~=0.3.0",
+ "sphinx-thebe~=0.2.0",
+ "sphinx-book-theme==0.4.0rc1",
"sphinx_togglebutton",
"sphinxcontrib-bibtex>=2.2.0,<=2.5.0",
"sphinx-multitoc-numbering~=0.1.3",
diff --git a/tests/books/config_custombuilder/extension/mycustomextension.py b/tests/books/config_custombuilder/extension/mycustomextension.py
index a567a7d3..7bfe9766 100644
--- a/tests/books/config_custombuilder/extension/mycustomextension.py
+++ b/tests/books/config_custombuilder/extension/mycustomextension.py
@@ -1,18 +1,16 @@
from sphinx.builders.html import StandaloneHTMLBuilder
-NB_RENDER_PRIORITY = {
- "mycustombuilder": (
- "application/vnd.jupyter.widget-view+json",
- "application/javascript",
- "text/html",
- "image/svg+xml",
- "image/png",
- "image/jpeg",
- "text/markdown",
- "text/latex",
- "text/plain",
- )
-}
+NB_MIME_PRIORITY_OVERRIDES = [
+ ("mycustombuilder", "application/vnd.jupyter.widget-view+json", 0),
+ ("mycustombuilder", "application/javascript", 1),
+ ("mycustombuilder", "text/html", 2),
+ ("mycustombuilder", "image/svg+xml", 3),
+ ("mycustombuilder", "image/png", 4),
+ ("mycustombuilder", "image/jpeg", 5),
+ ("mycustombuilder", "text/markdown", 6),
+ ("mycustombuilder", "text/latex", 7),
+ ("mycustombuilder", "text/plain", 8),
+]
class MyCustomBuilder(StandaloneHTMLBuilder):
@@ -22,15 +20,7 @@ class MyCustomBuilder(StandaloneHTMLBuilder):
def setup(app):
app.add_builder(MyCustomBuilder)
- # Add config to support myst_nb
- if "nb_render_priority" in app.config:
- app.config["nb_render_priority"]["mycustombuilder"] = NB_RENDER_PRIORITY[
- "mycustombuilder"
- ]
- else:
- app.add_config_value(
- "nb_render_priority", NB_RENDER_PRIORITY, "mycustombuilder"
- )
+ app.config["nb_mime_priority_overrides"] = NB_MIME_PRIORITY_OVERRIDES
return {
"version": "0.1",
diff --git a/tests/test_build.py b/tests/test_build.py
index 1db68327..ed4403fd 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -87,7 +87,7 @@ def test_custom_config(cli, build_resources):
assert result.exit_code == 0, result.output
html = config.joinpath("_build", "html", "index.html").read_text(encoding="utf8")
soup = BeautifulSoup(html, "html.parser")
- assert '<h1 class="site-logo" id="site-title">TEST PROJECT NAME</h1>' in html
+ assert '<p class="title logo__title">TEST PROJECT NAME</p>' in html
assert '<div class="sphinx-tabs docutils container">' in html
assert '<link rel="stylesheet" type="text/css" href="_static/mycss.css" />' in html
assert '<script src="_static/js/myjs.js"></script>' in html
@@ -241,8 +241,8 @@ def test_execution_timeout(pages, build_resources, cli):
"--keep-going",
],
)
- assert "Execution Failed" in result.stdout
- assert path_html.joinpath("reports", "loop_unrun.log").exists()
+ assert "Executing notebook failed:" in result.stdout
+ assert path_html.joinpath("reports", "loop_unrun.err.log").exists()
def test_build_using_custom_builder(cli, build_resources):
@@ -264,7 +264,7 @@ def test_build_using_custom_builder(cli, build_resources):
html = config.joinpath("_build", "mycustombuilder", "index.html").read_text(
encoding="utf8"
)
- assert '<h1 class="site-logo" id="site-title">TEST PROJECT NAME</h1>' in html
+ assert '<p class="title logo__title">TEST PROJECT NAME</p>' in html
assert '<link rel="stylesheet" type="text/css" href="_static/mycss.css" />' in html
assert '<script src="_static/js/myjs.js"></script>' in html
diff --git a/tests/test_build/_toc_numbered.sphinx4.html b/tests/test_build/_toc_numbered.sphinx4.html
index 3f2a4c25..ba8224a9 100644
--- a/tests/test_build/_toc_numbered.sphinx4.html
+++ b/tests/test_build/_toc_numbered.sphinx4.html
@@ -1,5 +1,5 @@
<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
- <div class="bd-toc-item active">
+ <div class="bd-toc-item navbar-nav active">
<ul class="nav bd-sidenav bd-sidenav__home-link">
<li class="toctree-l1 current active">
<a class="reference internal" href="#">
@@ -18,8 +18,8 @@
2. Subfolder
</a>
<input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
- <label for="toctree-checkbox-1">
- <i class="fas fa-chevron-down">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
</i>
</label>
<ul>
diff --git a/tests/test_build/_toc_numbered.sphinx5.html b/tests/test_build/_toc_numbered.sphinx5.html
new file mode 100644
index 00000000..ba8224a9
--- /dev/null
+++ b/tests/test_build/_toc_numbered.sphinx5.html
@@ -0,0 +1,46 @@
+<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
+ <div class="bd-toc-item navbar-nav active">
+ <ul class="nav bd-sidenav bd-sidenav__home-link">
+ <li class="toctree-l1 current active">
+ <a class="reference internal" href="#">
+ Main index
+ </a>
+ </li>
+ </ul>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content1.html">
+ 1. Content1
+ </a>
+ </li>
+ <li class="toctree-l1 has-children">
+ <a class="reference internal" href="subfolder/index.html">
+ 2. Subfolder
+ </a>
+ <input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage.html">
+ 2.1. Asubpage
+ </a>
+ </li>
+ </ul>
+ </input>
+ </li>
+ <li class="toctree-l1">
+ <a class="reference internal" href="content2.html">
+ 3. Content2
+ </a>
+ </li>
+ <li class="toctree-l1">
+ <a class="reference internal" href="content3.html">
+ 4. Content3
+ </a>
+ </li>
+ </ul>
+ </div>
+</nav>
diff --git a/tests/test_build/_toc_numbered_depth.sphinx4.html b/tests/test_build/_toc_numbered_depth.sphinx4.html
index 7c7f8f56..1aac17fb 100644
--- a/tests/test_build/_toc_numbered_depth.sphinx4.html
+++ b/tests/test_build/_toc_numbered_depth.sphinx4.html
@@ -1,5 +1,5 @@
<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
- <div class="bd-toc-item active">
+ <div class="bd-toc-item navbar-nav active">
<ul class="nav bd-sidenav bd-sidenav__home-link">
<li class="toctree-l1 current active">
<a class="reference internal" href="#">
@@ -18,8 +18,8 @@
2. Subfolder
</a>
<input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
- <label for="toctree-checkbox-1">
- <i class="fas fa-chevron-down">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
</i>
</label>
<ul>
diff --git a/tests/test_build/_toc_numbered_depth.sphinx5.html b/tests/test_build/_toc_numbered_depth.sphinx5.html
new file mode 100644
index 00000000..1aac17fb
--- /dev/null
+++ b/tests/test_build/_toc_numbered_depth.sphinx5.html
@@ -0,0 +1,46 @@
+<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
+ <div class="bd-toc-item navbar-nav active">
+ <ul class="nav bd-sidenav bd-sidenav__home-link">
+ <li class="toctree-l1 current active">
+ <a class="reference internal" href="#">
+ Main index
+ </a>
+ </li>
+ </ul>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content1.html">
+ 1. Content1
+ </a>
+ </li>
+ <li class="toctree-l1 has-children">
+ <a class="reference internal" href="subfolder/index.html">
+ 2. Subfolder
+ </a>
+ <input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage.html">
+ Asubpage
+ </a>
+ </li>
+ </ul>
+ </input>
+ </li>
+ <li class="toctree-l1">
+ <a class="reference internal" href="content2.html">
+ 3. Content2
+ </a>
+ </li>
+ <li class="toctree-l1">
+ <a class="reference internal" href="content3.html">
+ 4. Content3
+ </a>
+ </li>
+ </ul>
+ </div>
+</nav>
diff --git a/tests/test_build/_toc_numbered_depth_parts_subset.sphinx4.html b/tests/test_build/_toc_numbered_depth_parts_subset.sphinx4.html
index 514e5007..d53d3fea 100644
--- a/tests/test_build/_toc_numbered_depth_parts_subset.sphinx4.html
+++ b/tests/test_build/_toc_numbered_depth_parts_subset.sphinx4.html
@@ -1,5 +1,5 @@
<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
- <div class="bd-toc-item active">
+ <div class="bd-toc-item navbar-nav active">
<ul class="nav bd-sidenav bd-sidenav__home-link">
<li class="toctree-l1 current active">
<a class="reference internal" href="#">
@@ -47,8 +47,8 @@
2. Subfolder
</a>
<input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
- <label for="toctree-checkbox-1">
- <i class="fas fa-chevron-down">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
</i>
</label>
<ul>
diff --git a/tests/test_build/_toc_numbered_depth_parts_subset.sphinx5.html b/tests/test_build/_toc_numbered_depth_parts_subset.sphinx5.html
new file mode 100644
index 00000000..d53d3fea
--- /dev/null
+++ b/tests/test_build/_toc_numbered_depth_parts_subset.sphinx5.html
@@ -0,0 +1,65 @@
+<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
+ <div class="bd-toc-item navbar-nav active">
+ <ul class="nav bd-sidenav bd-sidenav__home-link">
+ <li class="toctree-l1 current active">
+ <a class="reference internal" href="#">
+ Main index
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 1
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content1.html">
+ 1. Content1
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 2
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content2.html">
+ Content2
+ </a>
+ </li>
+ <li class="toctree-l1">
+ <a class="reference internal" href="content3.html">
+ Content3
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 3
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1 has-children">
+ <a class="reference internal" href="subfolder/index.html">
+ 2. Subfolder
+ </a>
+ <input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage.html">
+ Asubpage
+ </a>
+ </li>
+ </ul>
+ </input>
+ </li>
+ </ul>
+ </div>
+</nav>
diff --git a/tests/test_build/_toc_numbered_parts.sphinx4.html b/tests/test_build/_toc_numbered_parts.sphinx4.html
index 3a2e0452..d3c29d8b 100644
--- a/tests/test_build/_toc_numbered_parts.sphinx4.html
+++ b/tests/test_build/_toc_numbered_parts.sphinx4.html
@@ -1,5 +1,5 @@
<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
- <div class="bd-toc-item active">
+ <div class="bd-toc-item navbar-nav active">
<ul class="nav bd-sidenav bd-sidenav__home-link">
<li class="toctree-l1 current active">
<a class="reference internal" href="#">
@@ -23,8 +23,8 @@
2. Subfolder
</a>
<input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
- <label for="toctree-checkbox-1">
- <i class="fas fa-chevron-down">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
</i>
</label>
<ul>
diff --git a/tests/test_build/_toc_numbered_parts.sphinx5.html b/tests/test_build/_toc_numbered_parts.sphinx5.html
new file mode 100644
index 00000000..d3c29d8b
--- /dev/null
+++ b/tests/test_build/_toc_numbered_parts.sphinx5.html
@@ -0,0 +1,58 @@
+<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
+ <div class="bd-toc-item navbar-nav active">
+ <ul class="nav bd-sidenav bd-sidenav__home-link">
+ <li class="toctree-l1 current active">
+ <a class="reference internal" href="#">
+ Main index
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 1
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content1.html">
+ 1. Content1
+ </a>
+ </li>
+ <li class="toctree-l1 has-children">
+ <a class="reference internal" href="subfolder/index.html">
+ 2. Subfolder
+ </a>
+ <input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage.html">
+ 2.1. Asubpage
+ </a>
+ </li>
+ </ul>
+ </input>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 2
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content2.html">
+ 3. Content2
+ </a>
+ </li>
+ <li class="toctree-l1">
+ <a class="reference internal" href="content3.html">
+ 4. Content3
+ </a>
+ </li>
+ </ul>
+ </div>
+</nav>
diff --git a/tests/test_build/_toc_numbered_parts_subset.sphinx4.html b/tests/test_build/_toc_numbered_parts_subset.sphinx4.html
index c75c308a..ee7f295d 100644
--- a/tests/test_build/_toc_numbered_parts_subset.sphinx4.html
+++ b/tests/test_build/_toc_numbered_parts_subset.sphinx4.html
@@ -1,5 +1,5 @@
<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
- <div class="bd-toc-item active">
+ <div class="bd-toc-item navbar-nav active">
<ul class="nav bd-sidenav bd-sidenav__home-link">
<li class="toctree-l1 current active">
<a class="reference internal" href="#">
@@ -47,8 +47,8 @@
2. Subfolder
</a>
<input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
- <label for="toctree-checkbox-1">
- <i class="fas fa-chevron-down">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
</i>
</label>
<ul>
diff --git a/tests/test_build/_toc_numbered_parts_subset.sphinx5.html b/tests/test_build/_toc_numbered_parts_subset.sphinx5.html
new file mode 100644
index 00000000..ee7f295d
--- /dev/null
+++ b/tests/test_build/_toc_numbered_parts_subset.sphinx5.html
@@ -0,0 +1,65 @@
+<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
+ <div class="bd-toc-item navbar-nav active">
+ <ul class="nav bd-sidenav bd-sidenav__home-link">
+ <li class="toctree-l1 current active">
+ <a class="reference internal" href="#">
+ Main index
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 1
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content1.html">
+ 1. Content1
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 2
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content2.html">
+ Content2
+ </a>
+ </li>
+ <li class="toctree-l1">
+ <a class="reference internal" href="content3.html">
+ Content3
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 3
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1 has-children">
+ <a class="reference internal" href="subfolder/index.html">
+ 2. Subfolder
+ </a>
+ <input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage.html">
+ 2.1. Asubpage
+ </a>
+ </li>
+ </ul>
+ </input>
+ </li>
+ </ul>
+ </div>
+</nav>
diff --git a/tests/test_config.py b/tests/test_config.py
index 94b9c500..8a780646 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -34,7 +34,8 @@ SPHINX_VERSION = f".sphinx{sphinx_build.version_info[0]}"
"local_extensions": {"helloworld": "./ext"},
"config": {
"html_theme_options": {
- "launch_buttons": {"binderhub_url": "other"}
+ "launch_buttons": {"binderhub_url": "other"},
+ "analytics": {"google_analytics_id": ""},
},
"html_theme": "other",
"new": "value",
diff --git a/tests/test_config/test_config_sphinx_command.txt b/tests/test_config/test_config_sphinx_command.txt
index a2e1137a..0771efe2 100644
--- a/tests/test_config/test_config_sphinx_command.txt
+++ b/tests/test_config/test_config_sphinx_command.txt
@@ -7,10 +7,6 @@ author = 'The Jupyter Book community'
comments_config = {'hypothesis': False, 'utterances': False}
copyright = '2022'
exclude_patterns = ['**.ipynb_checkpoints', '.DS_Store', 'Thumbs.db', '_build']
-execution_allow_errors = False
-execution_excludepatterns = []
-execution_in_temp = False
-execution_timeout = 30
extensions = ['sphinx_togglebutton', 'sphinx_copybutton', 'myst_nb', 'jupyter_book', 'sphinx_thebe', 'sphinx_comments', 'sphinx_external_toc', 'sphinx.ext.intersphinx', 'sphinx_design', 'sphinx_book_theme', 'sphinx_jupyterbook_latex']
external_toc_exclude_missing = False
external_toc_path = '_toc.yml'
@@ -19,13 +15,17 @@ html_favicon = ''
html_logo = ''
html_sourcelink_suffix = ''
html_theme = 'sphinx_book_theme'
-html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': '', 'jupyterhub_url': '', 'thebe': False, 'colab_url': ''}, 'path_to_docs': '', 'repository_url': 'https://github.com/executablebooks/jupyter-book', 'repository_branch': 'master', 'google_analytics_id': '', 'extra_navbar': 'Powered by <a href="https://jupyterbook.org">Jupyter Book</a>', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'use_repository_button': False, 'use_edit_page_button': False, 'use_issues_button': False}
+html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': '', 'jupyterhub_url': '', 'thebe': False, 'colab_url': ''}, 'path_to_docs': '', 'repository_url': 'https://github.com/executablebooks/jupyter-book', 'repository_branch': 'master', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'analytics': {'google_analytics_id': ''}, 'use_repository_button': False, 'use_edit_page_button': False, 'use_issues_button': False}
html_title = 'test'
-jupyter_cache = ''
-jupyter_execute_notebooks = 'auto'
latex_engine = 'pdflatex'
myst_enable_extensions = ['colon_fence', 'dollarmath', 'linkify', 'substitution', 'tasklist']
myst_url_schemes = ['mailto', 'http', 'https']
+nb_execution_allow_errors = False
+nb_execution_cache_path = ''
+nb_execution_excludepatterns = []
+nb_execution_in_temp = False
+nb_execution_mode = 'auto'
+nb_execution_timeout = 30
nb_output_stderr = 'show'
numfig = True
pygments_style = 'sphinx'
diff --git a/tests/test_config/test_config_sphinx_command_only_build_toc_files.txt b/tests/test_config/test_config_sphinx_command_only_build_toc_files.txt
index be3c2092..bf3e8a63 100644
--- a/tests/test_config/test_config_sphinx_command_only_build_toc_files.txt
+++ b/tests/test_config/test_config_sphinx_command_only_build_toc_files.txt
@@ -7,10 +7,6 @@ author = 'The Jupyter Book community'
comments_config = {'hypothesis': False, 'utterances': False}
copyright = '2022'
exclude_patterns = ['**.ipynb_checkpoints', '.DS_Store', 'Thumbs.db', '_build', 'test_config/*']
-execution_allow_errors = False
-execution_excludepatterns = []
-execution_in_temp = False
-execution_timeout = 30
extensions = ['sphinx_togglebutton', 'sphinx_copybutton', 'myst_nb', 'jupyter_book', 'sphinx_thebe', 'sphinx_comments', 'sphinx_external_toc', 'sphinx.ext.intersphinx', 'sphinx_design', 'sphinx_book_theme', 'sphinx_jupyterbook_latex']
external_toc_exclude_missing = False
external_toc_path = '_toc.yml'
@@ -19,13 +15,17 @@ html_favicon = ''
html_logo = ''
html_sourcelink_suffix = ''
html_theme = 'sphinx_book_theme'
-html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': '', 'jupyterhub_url': '', 'thebe': False, 'colab_url': ''}, 'path_to_docs': '', 'repository_url': 'https://github.com/executablebooks/jupyter-book', 'repository_branch': 'master', 'google_analytics_id': '', 'extra_navbar': 'Powered by <a href="https://jupyterbook.org">Jupyter Book</a>', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'use_repository_button': False, 'use_edit_page_button': False, 'use_issues_button': False}
+html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': '', 'jupyterhub_url': '', 'thebe': False, 'colab_url': ''}, 'path_to_docs': '', 'repository_url': 'https://github.com/executablebooks/jupyter-book', 'repository_branch': 'master', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'analytics': {'google_analytics_id': ''}, 'use_repository_button': False, 'use_edit_page_button': False, 'use_issues_button': False}
html_title = 'My Jupyter Book'
-jupyter_cache = ''
-jupyter_execute_notebooks = 'auto'
latex_engine = 'pdflatex'
myst_enable_extensions = ['colon_fence', 'dollarmath', 'linkify', 'substitution', 'tasklist']
myst_url_schemes = ['mailto', 'http', 'https']
+nb_execution_allow_errors = False
+nb_execution_cache_path = ''
+nb_execution_excludepatterns = []
+nb_execution_in_temp = False
+nb_execution_mode = 'auto'
+nb_execution_timeout = 30
nb_output_stderr = 'show'
numfig = True
pygments_style = 'sphinx'
diff --git a/tests/test_config/test_get_final_config_custom_myst_extensions.yml b/tests/test_config/test_get_final_config_custom_myst_extensions.yml
index 274f725e..ffa8c08c 100644
--- a/tests/test_config/test_get_final_config_custom_myst_extensions.yml
+++ b/tests/test_config/test_get_final_config_custom_myst_extensions.yml
@@ -13,10 +13,6 @@ final:
- .DS_Store
- Thumbs.db
- _build
- execution_allow_errors: false
- execution_excludepatterns: []
- execution_in_temp: false
- execution_timeout: 30
extensions:
- sphinx_togglebutton
- sphinx_copybutton
@@ -36,10 +32,10 @@ final:
html_sourcelink_suffix: ''
html_theme: sphinx_book_theme
html_theme_options:
+ analytics:
+ google_analytics_id: ''
announcement: ''
extra_footer: ''
- extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
- google_analytics_id: ''
home_page_in_toc: true
launch_buttons:
binderhub_url: ''
@@ -55,8 +51,6 @@ final:
use_issues_button: false
use_repository_button: false
html_title: My Jupyter Book
- jupyter_cache: ''
- jupyter_execute_notebooks: auto
latex_engine: pdflatex
myst_enable_extensions:
- colon_fence
@@ -68,6 +62,12 @@ final:
- mailto
- http
- https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
nb_output_stderr: show
numfig: true
pygments_style: sphinx
diff --git a/tests/test_config/test_get_final_config_empty_.yml b/tests/test_config/test_get_final_config_empty_.yml
index d9998b0c..58b3e7bf 100644
--- a/tests/test_config/test_get_final_config_empty_.yml
+++ b/tests/test_config/test_get_final_config_empty_.yml
@@ -10,10 +10,6 @@ final:
- .DS_Store
- Thumbs.db
- _build
- execution_allow_errors: false
- execution_excludepatterns: []
- execution_in_temp: false
- execution_timeout: 30
extensions:
- sphinx_togglebutton
- sphinx_copybutton
@@ -33,10 +29,10 @@ final:
html_sourcelink_suffix: ''
html_theme: sphinx_book_theme
html_theme_options:
+ analytics:
+ google_analytics_id: ''
announcement: ''
extra_footer: ''
- extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
- google_analytics_id: ''
home_page_in_toc: true
launch_buttons:
binderhub_url: ''
@@ -52,8 +48,6 @@ final:
use_issues_button: false
use_repository_button: false
html_title: My Jupyter Book
- jupyter_cache: ''
- jupyter_execute_notebooks: auto
latex_engine: pdflatex
myst_enable_extensions:
- colon_fence
@@ -65,6 +59,12 @@ final:
- mailto
- http
- https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
nb_output_stderr: show
numfig: true
pygments_style: sphinx
diff --git a/tests/test_config/test_get_final_config_exclude_patterns_.yml b/tests/test_config/test_get_final_config_exclude_patterns_.yml
index 206a24fb..d6040b37 100644
--- a/tests/test_config/test_get_final_config_exclude_patterns_.yml
+++ b/tests/test_config/test_get_final_config_exclude_patterns_.yml
@@ -13,10 +13,6 @@ final:
- Thumbs.db
- _build
- new
- execution_allow_errors: false
- execution_excludepatterns: []
- execution_in_temp: false
- execution_timeout: 30
extensions:
- sphinx_togglebutton
- sphinx_copybutton
@@ -36,10 +32,10 @@ final:
html_sourcelink_suffix: ''
html_theme: sphinx_book_theme
html_theme_options:
+ analytics:
+ google_analytics_id: ''
announcement: ''
extra_footer: ''
- extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
- google_analytics_id: ''
home_page_in_toc: true
launch_buttons:
binderhub_url: ''
@@ -55,8 +51,6 @@ final:
use_issues_button: false
use_repository_button: false
html_title: My Jupyter Book
- jupyter_cache: ''
- jupyter_execute_notebooks: auto
latex_engine: pdflatex
myst_enable_extensions:
- colon_fence
@@ -68,6 +62,12 @@ final:
- mailto
- http
- https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
nb_output_stderr: show
numfig: true
pygments_style: sphinx
diff --git a/tests/test_config/test_get_final_config_execute_method_.yml b/tests/test_config/test_get_final_config_execute_method_.yml
index b336a651..824ba309 100644
--- a/tests/test_config/test_get_final_config_execute_method_.yml
+++ b/tests/test_config/test_get_final_config_execute_method_.yml
@@ -12,10 +12,6 @@ final:
- .DS_Store
- Thumbs.db
- _build
- execution_allow_errors: false
- execution_excludepatterns: []
- execution_in_temp: false
- execution_timeout: 30
extensions:
- sphinx_togglebutton
- sphinx_copybutton
@@ -35,10 +31,10 @@ final:
html_sourcelink_suffix: ''
html_theme: sphinx_book_theme
html_theme_options:
+ analytics:
+ google_analytics_id: ''
announcement: ''
extra_footer: ''
- extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
- google_analytics_id: ''
home_page_in_toc: true
launch_buttons:
binderhub_url: ''
@@ -54,8 +50,6 @@ final:
use_issues_button: false
use_repository_button: false
html_title: My Jupyter Book
- jupyter_cache: ''
- jupyter_execute_notebooks: cache
latex_engine: pdflatex
myst_enable_extensions:
- colon_fence
@@ -67,6 +61,12 @@ final:
- mailto
- http
- https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: cache
+ nb_execution_timeout: 30
nb_output_stderr: show
numfig: true
pygments_style: sphinx
diff --git a/tests/test_config/test_get_final_config_extended_syntax_.yml b/tests/test_config/test_get_final_config_extended_syntax_.yml
index 91d0e054..2edad779 100644
--- a/tests/test_config/test_get_final_config_extended_syntax_.yml
+++ b/tests/test_config/test_get_final_config_extended_syntax_.yml
@@ -14,10 +14,6 @@ final:
- .DS_Store
- Thumbs.db
- _build
- execution_allow_errors: false
- execution_excludepatterns: []
- execution_in_temp: false
- execution_timeout: 30
extensions:
- sphinx_togglebutton
- sphinx_copybutton
@@ -37,10 +33,10 @@ final:
html_sourcelink_suffix: ''
html_theme: sphinx_book_theme
html_theme_options:
+ analytics:
+ google_analytics_id: ''
announcement: ''
extra_footer: ''
- extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
- google_analytics_id: ''
home_page_in_toc: true
launch_buttons:
binderhub_url: ''
@@ -56,8 +52,6 @@ final:
use_issues_button: false
use_repository_button: false
html_title: My Jupyter Book
- jupyter_cache: ''
- jupyter_execute_notebooks: auto
latex_engine: pdflatex
myst_enable_extensions:
- linkify
@@ -65,6 +59,12 @@ final:
- mailto
- http
- https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
nb_output_stderr: show
numfig: true
pygments_style: sphinx
diff --git a/tests/test_config/test_get_final_config_html_extra_footer_.yml b/tests/test_config/test_get_final_config_html_extra_footer_.yml
index b0851651..09dfeb2a 100644
--- a/tests/test_config/test_get_final_config_html_extra_footer_.yml
+++ b/tests/test_config/test_get_final_config_html_extra_footer_.yml
@@ -12,10 +12,6 @@ final:
- .DS_Store
- Thumbs.db
- _build
- execution_allow_errors: false
- execution_excludepatterns: []
- execution_in_temp: false
- execution_timeout: 30
extensions:
- sphinx_togglebutton
- sphinx_copybutton
@@ -35,10 +31,10 @@ final:
html_sourcelink_suffix: ''
html_theme: sphinx_book_theme
html_theme_options:
+ analytics:
+ google_analytics_id: ''
announcement: ''
extra_footer: ''
- extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
- google_analytics_id: ''
home_page_in_toc: true
launch_buttons:
binderhub_url: ''
@@ -54,8 +50,6 @@ final:
use_issues_button: false
use_repository_button: false
html_title: My Jupyter Book
- jupyter_cache: ''
- jupyter_execute_notebooks: auto
latex_engine: pdflatex
myst_enable_extensions:
- colon_fence
@@ -67,6 +61,12 @@ final:
- mailto
- http
- https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
nb_output_stderr: show
numfig: true
pygments_style: sphinx
diff --git a/tests/test_config/test_get_final_config_latex_doc_.yml b/tests/test_config/test_get_final_config_latex_doc_.yml
index 042e42ce..f9a43f04 100644
--- a/tests/test_config/test_get_final_config_latex_doc_.yml
+++ b/tests/test_config/test_get_final_config_latex_doc_.yml
@@ -14,10 +14,6 @@ final:
- .DS_Store
- Thumbs.db
- _build
- execution_allow_errors: false
- execution_excludepatterns: []
- execution_in_temp: false
- execution_timeout: 30
extensions:
- sphinx_togglebutton
- sphinx_copybutton
@@ -37,10 +33,10 @@ final:
html_sourcelink_suffix: ''
html_theme: sphinx_book_theme
html_theme_options:
+ analytics:
+ google_analytics_id: ''
announcement: ''
extra_footer: ''
- extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
- google_analytics_id: ''
home_page_in_toc: true
launch_buttons:
binderhub_url: ''
@@ -56,8 +52,6 @@ final:
use_issues_button: false
use_repository_button: false
html_title: My Jupyter Book
- jupyter_cache: ''
- jupyter_execute_notebooks: auto
latex_engine: pdflatex
myst_enable_extensions:
- colon_fence
@@ -69,6 +63,12 @@ final:
- mailto
- http
- https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
nb_output_stderr: show
numfig: true
pygments_style: sphinx
diff --git a/tests/test_config/test_get_final_config_launch_buttons_.yml b/tests/test_config/test_get_final_config_launch_buttons_.yml
index 37dae0c3..29ba02a8 100644
--- a/tests/test_config/test_get_final_config_launch_buttons_.yml
+++ b/tests/test_config/test_get_final_config_launch_buttons_.yml
@@ -12,10 +12,6 @@ final:
- .DS_Store
- Thumbs.db
- _build
- execution_allow_errors: false
- execution_excludepatterns: []
- execution_in_temp: false
- execution_timeout: 30
extensions:
- sphinx_togglebutton
- sphinx_copybutton
@@ -35,10 +31,10 @@ final:
html_sourcelink_suffix: ''
html_theme: sphinx_book_theme
html_theme_options:
+ analytics:
+ google_analytics_id: ''
announcement: ''
extra_footer: ''
- extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
- google_analytics_id: ''
home_page_in_toc: true
launch_buttons:
binderhub_url: other
@@ -54,8 +50,6 @@ final:
use_issues_button: false
use_repository_button: false
html_title: My Jupyter Book
- jupyter_cache: ''
- jupyter_execute_notebooks: auto
latex_engine: pdflatex
myst_enable_extensions:
- colon_fence
@@ -67,6 +61,12 @@ final:
- mailto
- http
- https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
nb_output_stderr: show
numfig: true
pygments_style: sphinx
diff --git a/tests/test_config/test_get_final_config_repository_.yml b/tests/test_config/test_get_final_config_repository_.yml
index fad32f3c..91b3947e 100644
--- a/tests/test_config/test_get_final_config_repository_.yml
+++ b/tests/test_config/test_get_final_config_repository_.yml
@@ -12,10 +12,6 @@ final:
- .DS_Store
- Thumbs.db
- _build
- execution_allow_errors: false
- execution_excludepatterns: []
- execution_in_temp: false
- execution_timeout: 30
extensions:
- sphinx_togglebutton
- sphinx_copybutton
@@ -35,10 +31,10 @@ final:
html_sourcelink_suffix: ''
html_theme: sphinx_book_theme
html_theme_options:
+ analytics:
+ google_analytics_id: ''
announcement: ''
extra_footer: ''
- extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
- google_analytics_id: ''
home_page_in_toc: true
launch_buttons:
binderhub_url: ''
@@ -54,8 +50,6 @@ final:
use_issues_button: false
use_repository_button: false
html_title: My Jupyter Book
- jupyter_cache: ''
- jupyter_execute_notebooks: auto
latex_engine: pdflatex
myst_enable_extensions:
- colon_fence
@@ -67,6 +61,12 @@ final:
- mailto
- http
- https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
nb_output_stderr: show
numfig: true
pygments_style: sphinx
diff --git a/tests/test_config/test_get_final_config_sphinx_default_.yml b/tests/test_config/test_get_final_config_sphinx_default_.yml
index d5781893..44b796ca 100644
--- a/tests/test_config/test_get_final_config_sphinx_default_.yml
+++ b/tests/test_config/test_get_final_config_sphinx_default_.yml
@@ -3,6 +3,8 @@ _user_config:
config:
html_theme: other
html_theme_options:
+ analytics:
+ google_analytics_id: ''
launch_buttons:
binderhub_url: other
new: value
@@ -21,10 +23,6 @@ final:
- .DS_Store
- Thumbs.db
- _build
- execution_allow_errors: false
- execution_excludepatterns: []
- execution_in_temp: false
- execution_timeout: 30
extensions:
- sphinx_togglebutton
- sphinx_copybutton
@@ -46,11 +44,11 @@ final:
html_sourcelink_suffix: ''
html_theme: other
html_theme_options:
+ analytics:
+ google_analytics_id: ''
launch_buttons:
binderhub_url: other
html_title: My Jupyter Book
- jupyter_cache: ''
- jupyter_execute_notebooks: auto
latex_engine: pdflatex
myst_enable_extensions:
- colon_fence
@@ -62,6 +60,12 @@ final:
- mailto
- http
- https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
nb_output_stderr: show
new: value
numfig: true
diff --git a/tests/test_config/test_get_final_config_sphinx_recurse_.yml b/tests/test_config/test_get_final_config_sphinx_recurse_.yml
index fd5e2822..e3405652 100644
--- a/tests/test_config/test_get_final_config_sphinx_recurse_.yml
+++ b/tests/test_config/test_get_final_config_sphinx_recurse_.yml
@@ -22,10 +22,6 @@ final:
- .DS_Store
- Thumbs.db
- _build
- execution_allow_errors: false
- execution_excludepatterns: []
- execution_in_temp: false
- execution_timeout: 30
extensions:
- sphinx_togglebutton
- sphinx_copybutton
@@ -47,10 +43,10 @@ final:
html_sourcelink_suffix: ''
html_theme: other
html_theme_options:
+ analytics:
+ google_analytics_id: ''
announcement: ''
extra_footer: ''
- extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
- google_analytics_id: ''
home_page_in_toc: true
launch_buttons:
binderhub_url: other
@@ -66,8 +62,6 @@ final:
use_issues_button: false
use_repository_button: false
html_title: My Jupyter Book
- jupyter_cache: ''
- jupyter_execute_notebooks: auto
latex_engine: pdflatex
myst_enable_extensions:
- colon_fence
@@ -79,6 +73,12 @@ final:
- mailto
- http
- https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
nb_output_stderr: show
new: value
numfig: true
diff --git a/tests/test_config/test_get_final_config_title_.yml b/tests/test_config/test_get_final_config_title_.yml
index 2a17f700..4c506813 100644
--- a/tests/test_config/test_get_final_config_title_.yml
+++ b/tests/test_config/test_get_final_config_title_.yml
@@ -11,10 +11,6 @@ final:
- .DS_Store
- Thumbs.db
- _build
- execution_allow_errors: false
- execution_excludepatterns: []
- execution_in_temp: false
- execution_timeout: 30
extensions:
- sphinx_togglebutton
- sphinx_copybutton
@@ -34,10 +30,10 @@ final:
html_sourcelink_suffix: ''
html_theme: sphinx_book_theme
html_theme_options:
+ analytics:
+ google_analytics_id: ''
announcement: ''
extra_footer: ''
- extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
- google_analytics_id: ''
home_page_in_toc: true
launch_buttons:
binderhub_url: ''
@@ -53,8 +49,6 @@ final:
use_issues_button: false
use_repository_button: false
html_title: hallo
- jupyter_cache: ''
- jupyter_execute_notebooks: auto
latex_engine: pdflatex
myst_enable_extensions:
- colon_fence
@@ -66,6 +60,12 @@ final:
- mailto
- http
- https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
nb_output_stderr: show
numfig: true
pygments_style: sphinx
diff --git a/tests/test_config/test_mathjax_config_warning.sphinx4.yml b/tests/test_config/test_mathjax_config_warning.sphinx4.yml
index dced3dc1..500e38b9 100644
--- a/tests/test_config/test_mathjax_config_warning.sphinx4.yml
+++ b/tests/test_config/test_mathjax_config_warning.sphinx4.yml
@@ -16,10 +16,6 @@ final:
- .DS_Store
- Thumbs.db
- _build
- execution_allow_errors: false
- execution_excludepatterns: []
- execution_in_temp: false
- execution_timeout: 30
extensions:
- sphinx_togglebutton
- sphinx_copybutton
@@ -39,10 +35,10 @@ final:
html_sourcelink_suffix: ''
html_theme: sphinx_book_theme
html_theme_options:
+ analytics:
+ google_analytics_id: ''
announcement: ''
extra_footer: ''
- extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
- google_analytics_id: ''
home_page_in_toc: true
launch_buttons:
binderhub_url: ''
@@ -58,8 +54,6 @@ final:
use_issues_button: false
use_repository_button: false
html_title: My Jupyter Book
- jupyter_cache: ''
- jupyter_execute_notebooks: auto
latex_engine: pdflatex
mathjax3_config:
TeX:
@@ -75,6 +69,12 @@ final:
- mailto
- http
- https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
nb_output_stderr: show
numfig: true
pygments_style: sphinx
diff --git a/tests/test_config/test_mathjax_config_warning.sphinx5.yml b/tests/test_config/test_mathjax_config_warning.sphinx5.yml
new file mode 100644
index 00000000..500e38b9
--- /dev/null
+++ b/tests/test_config/test_mathjax_config_warning.sphinx5.yml
@@ -0,0 +1,88 @@
+_user_config:
+ sphinx:
+ config:
+ mathjax3_config:
+ TeX:
+ Macros:
+ argmax: arg\,max
+final:
+ author: The Jupyter Book community
+ comments_config:
+ hypothesis: false
+ utterances: false
+ copyright: '2022'
+ exclude_patterns:
+ - '**.ipynb_checkpoints'
+ - .DS_Store
+ - Thumbs.db
+ - _build
+ extensions:
+ - sphinx_togglebutton
+ - sphinx_copybutton
+ - myst_nb
+ - jupyter_book
+ - sphinx_thebe
+ - sphinx_comments
+ - sphinx_external_toc
+ - sphinx.ext.intersphinx
+ - sphinx_design
+ - sphinx_book_theme
+ - sphinx_jupyterbook_latex
+ external_toc_exclude_missing: false
+ html_baseurl: ''
+ html_favicon: ''
+ html_logo: ''
+ html_sourcelink_suffix: ''
+ html_theme: sphinx_book_theme
+ html_theme_options:
+ analytics:
+ google_analytics_id: ''
+ announcement: ''
+ extra_footer: ''
+ home_page_in_toc: true
+ launch_buttons:
+ binderhub_url: ''
+ colab_url: ''
+ jupyterhub_url: ''
+ notebook_interface: classic
+ thebe: false
+ path_to_docs: ''
+ repository_branch: master
+ repository_url: https://github.com/executablebooks/jupyter-book
+ search_bar_text: Search this book...
+ use_edit_page_button: false
+ use_issues_button: false
+ use_repository_button: false
+ html_title: My Jupyter Book
+ latex_engine: pdflatex
+ mathjax3_config:
+ TeX:
+ Macros:
+ argmax: arg\,max
+ myst_enable_extensions:
+ - colon_fence
+ - dollarmath
+ - linkify
+ - substitution
+ - tasklist
+ myst_url_schemes:
+ - mailto
+ - http
+ - https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
+ nb_output_stderr: show
+ numfig: true
+ pygments_style: sphinx
+ suppress_warnings:
+ - myst.domains
+ use_jupyterbook_latex: true
+ use_multitoc_numbering: true
+metadata:
+ latex_doc_overrides:
+ title: My Jupyter Book
+ latex_individualpages: false
diff --git a/tests/test_config/test_mathjax_config_warning_mathjax2path.sphinx4.yml b/tests/test_config/test_mathjax_config_warning_mathjax2path.sphinx4.yml
index d998872d..5f9f85a9 100644
--- a/tests/test_config/test_mathjax_config_warning_mathjax2path.sphinx4.yml
+++ b/tests/test_config/test_mathjax_config_warning_mathjax2path.sphinx4.yml
@@ -17,10 +17,6 @@ final:
- .DS_Store
- Thumbs.db
- _build
- execution_allow_errors: false
- execution_excludepatterns: []
- execution_in_temp: false
- execution_timeout: 30
extensions:
- sphinx_togglebutton
- sphinx_copybutton
@@ -40,10 +36,10 @@ final:
html_sourcelink_suffix: ''
html_theme: sphinx_book_theme
html_theme_options:
+ analytics:
+ google_analytics_id: ''
announcement: ''
extra_footer: ''
- extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
- google_analytics_id: ''
home_page_in_toc: true
launch_buttons:
binderhub_url: ''
@@ -59,8 +55,6 @@ final:
use_issues_button: false
use_repository_button: false
html_title: My Jupyter Book
- jupyter_cache: ''
- jupyter_execute_notebooks: auto
latex_engine: pdflatex
mathjax2_config:
TeX:
@@ -77,6 +71,12 @@ final:
- mailto
- http
- https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
nb_output_stderr: show
numfig: true
pygments_style: sphinx
diff --git a/tests/test_config/test_mathjax_config_warning_mathjax2path.sphinx5.yml b/tests/test_config/test_mathjax_config_warning_mathjax2path.sphinx5.yml
new file mode 100644
index 00000000..5f9f85a9
--- /dev/null
+++ b/tests/test_config/test_mathjax_config_warning_mathjax2path.sphinx5.yml
@@ -0,0 +1,90 @@
+_user_config:
+ sphinx:
+ config:
+ mathjax2_config:
+ TeX:
+ Macros:
+ argmax: arg\,max
+ mathjax_path: https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_CHTML
+final:
+ author: The Jupyter Book community
+ comments_config:
+ hypothesis: false
+ utterances: false
+ copyright: '2022'
+ exclude_patterns:
+ - '**.ipynb_checkpoints'
+ - .DS_Store
+ - Thumbs.db
+ - _build
+ extensions:
+ - sphinx_togglebutton
+ - sphinx_copybutton
+ - myst_nb
+ - jupyter_book
+ - sphinx_thebe
+ - sphinx_comments
+ - sphinx_external_toc
+ - sphinx.ext.intersphinx
+ - sphinx_design
+ - sphinx_book_theme
+ - sphinx_jupyterbook_latex
+ external_toc_exclude_missing: false
+ html_baseurl: ''
+ html_favicon: ''
+ html_logo: ''
+ html_sourcelink_suffix: ''
+ html_theme: sphinx_book_theme
+ html_theme_options:
+ analytics:
+ google_analytics_id: ''
+ announcement: ''
+ extra_footer: ''
+ home_page_in_toc: true
+ launch_buttons:
+ binderhub_url: ''
+ colab_url: ''
+ jupyterhub_url: ''
+ notebook_interface: classic
+ thebe: false
+ path_to_docs: ''
+ repository_branch: master
+ repository_url: https://github.com/executablebooks/jupyter-book
+ search_bar_text: Search this book...
+ use_edit_page_button: false
+ use_issues_button: false
+ use_repository_button: false
+ html_title: My Jupyter Book
+ latex_engine: pdflatex
+ mathjax2_config:
+ TeX:
+ Macros:
+ argmax: arg\,max
+ mathjax_path: https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_CHTML
+ myst_enable_extensions:
+ - colon_fence
+ - dollarmath
+ - linkify
+ - substitution
+ - tasklist
+ myst_url_schemes:
+ - mailto
+ - http
+ - https
+ nb_execution_allow_errors: false
+ nb_execution_cache_path: ''
+ nb_execution_excludepatterns: []
+ nb_execution_in_temp: false
+ nb_execution_mode: auto
+ nb_execution_timeout: 30
+ nb_output_stderr: show
+ numfig: true
+ pygments_style: sphinx
+ suppress_warnings:
+ - myst.domains
+ use_jupyterbook_latex: true
+ use_multitoc_numbering: true
+metadata:
+ latex_doc_overrides:
+ title: My Jupyter Book
+ latex_individualpages: false
diff --git a/tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_multitoc_numbering_false.sphinx4.html b/tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_multitoc_numbering_false.sphinx4.html
index 7c7f8f56..1aac17fb 100644
--- a/tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_multitoc_numbering_false.sphinx4.html
+++ b/tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_multitoc_numbering_false.sphinx4.html
@@ -1,5 +1,5 @@
<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
- <div class="bd-toc-item active">
+ <div class="bd-toc-item navbar-nav active">
<ul class="nav bd-sidenav bd-sidenav__home-link">
<li class="toctree-l1 current active">
<a class="reference internal" href="#">
@@ -18,8 +18,8 @@
2. Subfolder
</a>
<input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
- <label for="toctree-checkbox-1">
- <i class="fas fa-chevron-down">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
</i>
</label>
<ul>
diff --git a/tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_multitoc_numbering_false.sphinx5.html b/tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_multitoc_numbering_false.sphinx5.html
new file mode 100644
index 00000000..1aac17fb
--- /dev/null
+++ b/tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_multitoc_numbering_false.sphinx5.html
@@ -0,0 +1,46 @@
+<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
+ <div class="bd-toc-item navbar-nav active">
+ <ul class="nav bd-sidenav bd-sidenav__home-link">
+ <li class="toctree-l1 current active">
+ <a class="reference internal" href="#">
+ Main index
+ </a>
+ </li>
+ </ul>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content1.html">
+ 1. Content1
+ </a>
+ </li>
+ <li class="toctree-l1 has-children">
+ <a class="reference internal" href="subfolder/index.html">
+ 2. Subfolder
+ </a>
+ <input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage.html">
+ Asubpage
+ </a>
+ </li>
+ </ul>
+ </input>
+ </li>
+ <li class="toctree-l1">
+ <a class="reference internal" href="content2.html">
+ 3. Content2
+ </a>
+ </li>
+ <li class="toctree-l1">
+ <a class="reference internal" href="content3.html">
+ 4. Content3
+ </a>
+ </li>
+ </ul>
+ </div>
+</nav>
diff --git a/tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_parts_subset_multitoc_numbering_false.sphinx4.html b/tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_parts_subset_multitoc_numbering_false.sphinx4.html
index 5fc8ac6a..e2452dc9 100644
--- a/tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_parts_subset_multitoc_numbering_false.sphinx4.html
+++ b/tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_parts_subset_multitoc_numbering_false.sphinx4.html
@@ -1,5 +1,5 @@
<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
- <div class="bd-toc-item active">
+ <div class="bd-toc-item navbar-nav active">
<ul class="nav bd-sidenav bd-sidenav__home-link">
<li class="toctree-l1 current active">
<a class="reference internal" href="#">
@@ -47,8 +47,8 @@
1. Subfolder
</a>
<input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
- <label for="toctree-checkbox-1">
- <i class="fas fa-chevron-down">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
</i>
</label>
<ul>
diff --git a/tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_parts_subset_multitoc_numbering_false.sphinx5.html b/tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_parts_subset_multitoc_numbering_false.sphinx5.html
new file mode 100644
index 00000000..e2452dc9
--- /dev/null
+++ b/tests/test_sphinx_multitoc_numbering/_toc_numbered_depth_parts_subset_multitoc_numbering_false.sphinx5.html
@@ -0,0 +1,65 @@
+<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
+ <div class="bd-toc-item navbar-nav active">
+ <ul class="nav bd-sidenav bd-sidenav__home-link">
+ <li class="toctree-l1 current active">
+ <a class="reference internal" href="#">
+ Main index
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 1
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content1.html">
+ 1. Content1
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 2
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content2.html">
+ Content2
+ </a>
+ </li>
+ <li class="toctree-l1">
+ <a class="reference internal" href="content3.html">
+ Content3
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 3
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1 has-children">
+ <a class="reference internal" href="subfolder/index.html">
+ 1. Subfolder
+ </a>
+ <input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage.html">
+ Asubpage
+ </a>
+ </li>
+ </ul>
+ </input>
+ </li>
+ </ul>
+ </div>
+</nav>
diff --git a/tests/test_sphinx_multitoc_numbering/_toc_numbered_multitoc_numbering_false.sphinx4.html b/tests/test_sphinx_multitoc_numbering/_toc_numbered_multitoc_numbering_false.sphinx4.html
index 3f2a4c25..ba8224a9 100644
--- a/tests/test_sphinx_multitoc_numbering/_toc_numbered_multitoc_numbering_false.sphinx4.html
+++ b/tests/test_sphinx_multitoc_numbering/_toc_numbered_multitoc_numbering_false.sphinx4.html
@@ -1,5 +1,5 @@
<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
- <div class="bd-toc-item active">
+ <div class="bd-toc-item navbar-nav active">
<ul class="nav bd-sidenav bd-sidenav__home-link">
<li class="toctree-l1 current active">
<a class="reference internal" href="#">
@@ -18,8 +18,8 @@
2. Subfolder
</a>
<input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
- <label for="toctree-checkbox-1">
- <i class="fas fa-chevron-down">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
</i>
</label>
<ul>
diff --git a/tests/test_sphinx_multitoc_numbering/_toc_numbered_multitoc_numbering_false.sphinx5.html b/tests/test_sphinx_multitoc_numbering/_toc_numbered_multitoc_numbering_false.sphinx5.html
new file mode 100644
index 00000000..ba8224a9
--- /dev/null
+++ b/tests/test_sphinx_multitoc_numbering/_toc_numbered_multitoc_numbering_false.sphinx5.html
@@ -0,0 +1,46 @@
+<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
+ <div class="bd-toc-item navbar-nav active">
+ <ul class="nav bd-sidenav bd-sidenav__home-link">
+ <li class="toctree-l1 current active">
+ <a class="reference internal" href="#">
+ Main index
+ </a>
+ </li>
+ </ul>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content1.html">
+ 1. Content1
+ </a>
+ </li>
+ <li class="toctree-l1 has-children">
+ <a class="reference internal" href="subfolder/index.html">
+ 2. Subfolder
+ </a>
+ <input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage.html">
+ 2.1. Asubpage
+ </a>
+ </li>
+ </ul>
+ </input>
+ </li>
+ <li class="toctree-l1">
+ <a class="reference internal" href="content2.html">
+ 3. Content2
+ </a>
+ </li>
+ <li class="toctree-l1">
+ <a class="reference internal" href="content3.html">
+ 4. Content3
+ </a>
+ </li>
+ </ul>
+ </div>
+</nav>
diff --git a/tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_multitoc_numbering_false.sphinx4.html b/tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_multitoc_numbering_false.sphinx4.html
index 84497c84..9d8782e9 100644
--- a/tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_multitoc_numbering_false.sphinx4.html
+++ b/tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_multitoc_numbering_false.sphinx4.html
@@ -1,5 +1,5 @@
<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
- <div class="bd-toc-item active">
+ <div class="bd-toc-item navbar-nav active">
<ul class="nav bd-sidenav bd-sidenav__home-link">
<li class="toctree-l1 current active">
<a class="reference internal" href="#">
@@ -23,8 +23,8 @@
2. Subfolder
</a>
<input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
- <label for="toctree-checkbox-1">
- <i class="fas fa-chevron-down">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
</i>
</label>
<ul>
diff --git a/tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_multitoc_numbering_false.sphinx5.html b/tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_multitoc_numbering_false.sphinx5.html
new file mode 100644
index 00000000..9d8782e9
--- /dev/null
+++ b/tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_multitoc_numbering_false.sphinx5.html
@@ -0,0 +1,58 @@
+<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
+ <div class="bd-toc-item navbar-nav active">
+ <ul class="nav bd-sidenav bd-sidenav__home-link">
+ <li class="toctree-l1 current active">
+ <a class="reference internal" href="#">
+ Main index
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 1
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content1.html">
+ 1. Content1
+ </a>
+ </li>
+ <li class="toctree-l1 has-children">
+ <a class="reference internal" href="subfolder/index.html">
+ 2. Subfolder
+ </a>
+ <input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage.html">
+ 2.1. Asubpage
+ </a>
+ </li>
+ </ul>
+ </input>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 2
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content2.html">
+ 1. Content2
+ </a>
+ </li>
+ <li class="toctree-l1">
+ <a class="reference internal" href="content3.html">
+ 2. Content3
+ </a>
+ </li>
+ </ul>
+ </div>
+</nav>
diff --git a/tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_subset_multitoc_numbering_false.sphinx4.html b/tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_subset_multitoc_numbering_false.sphinx4.html
index 238dd337..53b6cf0a 100644
--- a/tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_subset_multitoc_numbering_false.sphinx4.html
+++ b/tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_subset_multitoc_numbering_false.sphinx4.html
@@ -1,5 +1,5 @@
<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
- <div class="bd-toc-item active">
+ <div class="bd-toc-item navbar-nav active">
<ul class="nav bd-sidenav bd-sidenav__home-link">
<li class="toctree-l1 current active">
<a class="reference internal" href="#">
@@ -47,8 +47,8 @@
1. Subfolder
</a>
<input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
- <label for="toctree-checkbox-1">
- <i class="fas fa-chevron-down">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
</i>
</label>
<ul>
diff --git a/tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_subset_multitoc_numbering_false.sphinx5.html b/tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_subset_multitoc_numbering_false.sphinx5.html
new file mode 100644
index 00000000..53b6cf0a
--- /dev/null
+++ b/tests/test_sphinx_multitoc_numbering/_toc_numbered_parts_subset_multitoc_numbering_false.sphinx5.html
@@ -0,0 +1,65 @@
+<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
+ <div class="bd-toc-item navbar-nav active">
+ <ul class="nav bd-sidenav bd-sidenav__home-link">
+ <li class="toctree-l1 current active">
+ <a class="reference internal" href="#">
+ Main index
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 1
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content1.html">
+ 1. Content1
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 2
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1">
+ <a class="reference internal" href="content2.html">
+ Content2
+ </a>
+ </li>
+ <li class="toctree-l1">
+ <a class="reference internal" href="content3.html">
+ Content3
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Chapter 3
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1 has-children">
+ <a class="reference internal" href="subfolder/index.html">
+ 1. Subfolder
+ </a>
+ <input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage.html">
+ 1.1. Asubpage
+ </a>
+ </li>
+ </ul>
+ </input>
+ </li>
+ </ul>
+ </div>
+</nav>
diff --git a/tests/test_tocdirective/test_toc_parts_directive.sphinx5.html b/tests/test_tocdirective/test_toc_parts_directive.sphinx5.html
new file mode 100644
index 00000000..31040a84
--- /dev/null
+++ b/tests/test_tocdirective/test_toc_parts_directive.sphinx5.html
@@ -0,0 +1,21 @@
+<div class="toctree-wrapper compound">
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ A section
+ </span>
+ </p>
+ <ul>
+ <li class="toctree-l1">
+ <a class="reference internal" href="subfolder/index.html">
+ Subfolder
+ </a>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage1.html">
+ Asubpage 1
+ </a>
+ </li>
+ </ul>
+ </li>
+ </ul>
+</div>
diff --git a/tests/test_tocdirective/test_toc_parts_sidebar.sphinx4.html b/tests/test_tocdirective/test_toc_parts_sidebar.sphinx4.html
index 4a5cb40a..c35f83cd 100644
--- a/tests/test_tocdirective/test_toc_parts_sidebar.sphinx4.html
+++ b/tests/test_tocdirective/test_toc_parts_sidebar.sphinx4.html
@@ -1,5 +1,5 @@
<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
- <div class="bd-toc-item active">
+ <div class="bd-toc-item navbar-nav active">
<ul class="nav bd-sidenav bd-sidenav__home-link">
<li class="toctree-l1 current active">
<a class="reference internal" href="#">
@@ -18,8 +18,8 @@
Subfolder
</a>
<input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
- <label for="toctree-checkbox-1">
- <i class="fas fa-chevron-down">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
</i>
</label>
<ul>
@@ -43,8 +43,8 @@
Content1
</a>
<input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" type="checkbox">
- <label for="toctree-checkbox-2">
- <i class="fas fa-chevron-down">
+ <label class="toctree-toggle" for="toctree-checkbox-2">
+ <i class="fa-solid fa-chevron-down">
</i>
</label>
<ul>
@@ -61,8 +61,8 @@
Content2
</a>
<input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" type="checkbox">
- <label for="toctree-checkbox-3">
- <i class="fas fa-chevron-down">
+ <label class="toctree-toggle" for="toctree-checkbox-3">
+ <i class="fa-solid fa-chevron-down">
</i>
</label>
<ul>
@@ -78,19 +78,20 @@
<a class="reference internal" href="content3.html">
Content3
</a>
- <input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" type="checkbox"/>
- <label for="toctree-checkbox-4">
- <i class="fas fa-chevron-down">
- </i>
- </label>
- <ul>
- <li class="toctree-l2">
- <a class="reference internal" href="subfolder/asubpage4.html">
- Asubpage 4
- </a>
- </li>
- </ul>
+ <input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-4">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage4.html">
+ Asubpage 4
+ </a>
+ </li>
+ </ul>
+ </input>
</li>
</ul>
</div>
-</nav>
\ No newline at end of file
+</nav>
diff --git a/tests/test_tocdirective/test_toc_parts_sidebar.sphinx5.html b/tests/test_tocdirective/test_toc_parts_sidebar.sphinx5.html
new file mode 100644
index 00000000..c35f83cd
--- /dev/null
+++ b/tests/test_tocdirective/test_toc_parts_sidebar.sphinx5.html
@@ -0,0 +1,97 @@
+<nav aria-label="Main" class="bd-links" id="bd-docs-nav">
+ <div class="bd-toc-item navbar-nav active">
+ <ul class="nav bd-sidenav bd-sidenav__home-link">
+ <li class="toctree-l1 current active">
+ <a class="reference internal" href="#">
+ Main index
+ </a>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ A section
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1 has-children">
+ <a class="reference internal" href="subfolder/index.html">
+ Subfolder
+ </a>
+ <input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-1">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage1.html">
+ Asubpage 1
+ </a>
+ </li>
+ </ul>
+ </input>
+ </li>
+ </ul>
+ <p aria-level="2" class="caption" role="heading">
+ <span class="caption-text">
+ Another section
+ </span>
+ </p>
+ <ul class="nav bd-sidenav">
+ <li class="toctree-l1 has-children">
+ <a class="reference internal" href="content1.html">
+ Content1
+ </a>
+ <input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-2">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage2.html">
+ Asubpage 2
+ </a>
+ </li>
+ </ul>
+ </input>
+ </li>
+ <li class="toctree-l1 has-children">
+ <a class="reference internal" href="content2.html">
+ Content2
+ </a>
+ <input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-3">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage3.html">
+ Asubpage 3
+ </a>
+ </li>
+ </ul>
+ </input>
+ </li>
+ <li class="toctree-l1 has-children">
+ <a class="reference internal" href="content3.html">
+ Content3
+ </a>
+ <input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" type="checkbox">
+ <label class="toctree-toggle" for="toctree-checkbox-4">
+ <i class="fa-solid fa-chevron-down">
+ </i>
+ </label>
+ <ul>
+ <li class="toctree-l2">
+ <a class="reference internal" href="subfolder/asubpage4.html">
+ Asubpage 4
+ </a>
+ </li>
+ </ul>
+ </input>
+ </li>
+ </ul>
+ </div>
+</nav>
diff --git a/tox.ini b/tox.ini
index 7a6447eb..8588f7ce 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,10 +17,11 @@ envlist = py39-sphinx4
usedevelop = true
passenv=TERM
-[testenv:py{37,38,39}-sphinx{4}]
+[testenv:py{37,38,39}-sphinx{4,5}]
extras = testing
deps =
sphinx4: sphinx>=4,<5
+ sphinx5: sphinx<=5,<6
commands = pytest {posargs}
[testenv:cli]
--
GitLab