diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f64c6ef149992ac3739c880fe8b67c4ef7d6ea6f..129aec6291161eae58593f50e87538ee98a013f7 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 2380b34ce1586616464b24d06f1e5ca506118aa4..8559b9bf6b46bb755bb30a76f7793fa48828adcf 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 e83967789ef601df55100305745497c20779dc3b..a849ed4d4e55513b12d55dddfeca98439ce542d6 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 4c8c4da9007ff9a365f97e1db4d417811999f6eb..2239224521696c953c800625651ecc2ca9f9f218 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 e24c9c0bf47d61ae0fd89c9237362f30fda7d7a7..611ff0f0001a4a49eb9417d4de84a913958f9e8d 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 ca556d5d183a5f47d93c8f9aa0372266ebec8946..ad82b2115f0eca92bfe9e28b911edbba491e405b 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 14eafc4043a3b303e6969d88b2a09d6a254a1468..e6f89718061289829fc6619cb720dbc53b214c19 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 cd4bb8d64a67f54cddc5b8db34a2d78f3cc7903e..e365221c528df57b9ed06ccfd8b78f246b39f35d 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 ce25b4b108930d748a2bdd74f165927bececa133..df3bd6b37c1963fddccbcb9dcfcc937894fce67d 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 9c161912f62bff501dc75801df9f665a6369375e..a2d356141daef670a416a4efdfa4fe93c45efc07 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 9fd1991a74fdb15774f6bae0a48486d0fdb19ac6..e86da42ad4c14c802af93539c8739d2780f06275 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 0000000000000000000000000000000000000000..ac8b72d7b34223449f5fdf2b23c64099ea5b0b7c --- /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 8af55f924dfb5625698d4662dd027121de448c21..6865d0db7293db2dcb0174616fefa53416bf56c3 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 a9cafbe5e9b03504450fc9db9d0c667a1f03b514..a4ae83d76da46528174c3cf18fd561b346478c54 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 0ffecfb0494717bd9d17aeba9dd8bfbcca31946a..85726489482d4fa3470395c6205147021d49ddce 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 13603fcf708b0d26a6976e2a10b42e5cecfbd935..e44c90fc22a765a9d0c2d5cb0d99b295d4627332 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 0b1b2569a4e170fbb8906e754b323366e210ee4c..c8dca9179d7a8a10d21e63014e5ec3cc683541e6 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 a69a33497e015a81a48db6b3563b40e04d1fda49..421b0d0e23075c047faf2efdc387ab0c0c79476f 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 f790e4e4acf7489b15672be1e2f00c3cd8043d2a..8a6e743aa9a3dc345aae47a9d8b7170cbaf7a60b 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 a0e7897b2999b2b23fbdb7f8676eccbe04effbf6..0f7f8242e26f15cda47716d71e5620aa8b96135d 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 a567a7d36884f85ffd24fddfb4a6ecfcd900b515..7bfe9766c9a9edb3a97aa9982b9775ea957588e6 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 1db68327d7945da11d8b39f0afd8a5e659a71404..ed4403fd107e12fa497501df4a76d460cb4a77f0 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 3f2a4c25c6e3fdf07a995d2546c7abeb8fec4398..ba8224a9eaffdba5b6bbda0274a7639384bf2f7d 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 0000000000000000000000000000000000000000..ba8224a9eaffdba5b6bbda0274a7639384bf2f7d --- /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 7c7f8f56029d3e0faef70653d1818ae35a91b111..1aac17fb1c2256764f88dd86ec49fe186d6be29f 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 0000000000000000000000000000000000000000..1aac17fb1c2256764f88dd86ec49fe186d6be29f --- /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 514e50072d1198ef03583e4922e4ee0c406e7fee..d53d3fea6fcfc6ce560fa5850b911014528ba0df 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 0000000000000000000000000000000000000000..d53d3fea6fcfc6ce560fa5850b911014528ba0df --- /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 3a2e04522998d20705f0970048a63885f9c3774a..d3c29d8b3fb0add26585436e14b6898d2c59003e 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 0000000000000000000000000000000000000000..d3c29d8b3fb0add26585436e14b6898d2c59003e --- /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 c75c308aabf32bf58760ffcaace11cfc268a5278..ee7f295dd4b3913e639c72c93174bac7d5774ac2 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 0000000000000000000000000000000000000000..ee7f295dd4b3913e639c72c93174bac7d5774ac2 --- /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 94b9c50020f39b199dee27e68e05e4773db0d677..8a780646f491f744bcbc3dc03e69ee88528b1119 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 a2e1137a017bc4ab32ef94084a15fd0797e7b80e..0771efe2c6e8d199e40c9c583e2957c674a69b1a 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 be3c2092b79a2b7f540fd2e0dfca1db8e879b290..bf3e8a634efaee41f9f8338cc620b8ed1cd4be91 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 274f725e30dfb0906f5799ef9f34d4a62b579ebf..ffa8c08cb3a4ee371e89f194030052a375ea7d75 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 d9998b0cc296a392766f5f0195bc92d356e08a2b..58b3e7bfa7e75e846062d4a0cf4550c3aef2b6f9 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 206a24fb60367fde54e4a3258e249e93e77716d3..d6040b377b5c4620e5d90c6fe85e95959fb60cd3 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 b336a651a9eeae55f3b3f6c678dd1269aeab9a06..824ba3092a32ace3ea456a0472d059802db2ac39 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 91d0e054712d909a2c525054733bb6cc6e252ca9..2edad779b17d06d93fd98482c2a3da7b2ace04b9 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 b085165194a49d742a30110617a34fc91a0de602..09dfeb2a9e93339c994ed7e2a199d8078add69f1 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 042e42ce01d38bc16f9514b75f04a77fb4029e29..f9a43f04f1cb444b522d5ac1dbfa9dca7d300a0c 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 37dae0c38b741d8fc0cd05a65c0a5a7e615f4d63..29ba02a80cf2eb09e806ba784bea67c3c2bf6ae2 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 fad32f3c248525c9c9a97a2b8712e40a608ed7cf..91b3947e5ef005e601d8e81fbcaa5c00fe9be0c7 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 d578189310d46fb1f4cb53f34926dc06e13db54c..44b796ca94878f576dcef6bef6e606a27d19fd4a 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 fd5e28224a4eeeb1c7f54269cdbc9c0f632ead1c..e340565263cea54f3719c7ae81c68a1f7b45aaeb 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 2a17f7006390524fa99bb97f342916a6682e1d73..4c506813da991f0d0f545425a99ec62ea0a47788 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 dced3dc10c465f8beac2ced499bb94d3779e4dca..500e38b980ba0812092ced92bf94ad433b3dc7de 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 0000000000000000000000000000000000000000..500e38b980ba0812092ced92bf94ad433b3dc7de --- /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 d998872de930a207d29bf6c9e9ab4fe87002a8cb..5f9f85a9fe180408bc58975cd767e5848b2de47d 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 0000000000000000000000000000000000000000..5f9f85a9fe180408bc58975cd767e5848b2de47d --- /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 7c7f8f56029d3e0faef70653d1818ae35a91b111..1aac17fb1c2256764f88dd86ec49fe186d6be29f 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 0000000000000000000000000000000000000000..1aac17fb1c2256764f88dd86ec49fe186d6be29f --- /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 5fc8ac6ae02fccab58180f46308da336f4684a4d..e2452dc9b8c2af2d7b71f2120dc5e7c358f86ddd 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 0000000000000000000000000000000000000000..e2452dc9b8c2af2d7b71f2120dc5e7c358f86ddd --- /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 3f2a4c25c6e3fdf07a995d2546c7abeb8fec4398..ba8224a9eaffdba5b6bbda0274a7639384bf2f7d 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 0000000000000000000000000000000000000000..ba8224a9eaffdba5b6bbda0274a7639384bf2f7d --- /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 84497c8442c9ed5e756225aa69f3aa27a16bda0b..9d8782e959a9aa75e840ce3309dfa905877e4b77 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 0000000000000000000000000000000000000000..9d8782e959a9aa75e840ce3309dfa905877e4b77 --- /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 238dd337b39e2dcc5e38798b30c593c2e073c21b..53b6cf0ad1e00bd1aef3ae9cbbe2793b352e6b0d 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 0000000000000000000000000000000000000000..53b6cf0ad1e00bd1aef3ae9cbbe2793b352e6b0d --- /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 0000000000000000000000000000000000000000..31040a84989762379e8bf2cf88c503e8fa724077 --- /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 4a5cb40a8d521d074f5b3fb645c84a020cd678e4..c35f83cd2d57d2b96d45a2a76bb3dd725e121f0c 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 0000000000000000000000000000000000000000..c35f83cd2d57d2b96d45a2a76bb3dd725e121f0c --- /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 7a6447eb4bb47ec6078c3d912f0b1b38e6737f79..8588f7cec172ce949bf98e8dd6e01065c65f1996 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]