Skip to content

Commit 931b9ab

Browse files
gabalafoudependabot[bot]drammockagoose77sphuber
authored
Merge main into feature-focus (#1685)
* Build(deps): Bump actions/setup-python from 4 to 5 (#1590) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Use pytest-regressions to mark expected a11y test failures (#1501) * Use pytest-regressions with a11y tests to mark expected failures * Update tests/test_a11y.py * frozen data class * Revert "frozen data class" This reverts commit 3b0c73e. --------- Co-authored-by: Daniel McCloy <[email protected]> * FIX: avoid implicit string comparison in Sphinx 7.26 (#1592) * FIX: avoid implicit string comparison in Sphinx 7.26 * lint --------- Co-authored-by: Daniel McCloy <[email protected]> * Build(deps): Bump actions/upload-artifact from 3 to 4 (#1598) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update fontawesome from 6.1.2 to 6.5.1 (#1600) * Fix landmark-unique error due to in-page TOC (#1607) * landmark unique error due to in-page TOC * Apply suggestions from code review Co-authored-by: Tania Allard <[email protected]> * fix lint? --------- Co-authored-by: Tania Allard <[email protected]> * Feature: Add support for per-page secondary sidebar content (#1572) * Add ability to set per-page secondary sidebars * Add additional secondary sidebar content tests; expanded utils docstring * Update translation files (#1606) * Bump minimum Python from 3.8 to 3.9; add 3.12 to CIs (#1610) drop py3.8, add py3.12 * Fix: more efficient determination of when to hide primary sidebar (#1609) * minor refactors suggested by Ruff * move TOC generation from layout.html to sidebar-primary.html * replace @lru_cache(None) with plain @cache * get sidebar TOC length without rendering it * fixup rebase/stash snafu * bugfix * Fix "More" links in mobile sidebar (#1604) Fix #1603 * bump: 0.14.4 → 0.15.0rc0 * Updates for file src/pydata_sphinx_theme/locale/en/LC_MESSAGES/sphinx.po in fr (#1618) i18n: Translate sphinx.po in fr 100% translated source file: 'sphinx.po' on 'fr'. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * bump: 0.14.4 → 0.15.0 * fix: drop the dev test (#1623) * fix: remove Site navigation header (#1615) * fix: remove Site navigation header * test: edit the test suit * fix: align all breadcrumb elements (#1619) * fix: log information when warnings are disabled (#1617) * bump: 0.15.0 → 0.15.1 * back to dev * fix: align the search button with other icons (#1620) * test: display the search button for demo purposes * fix: only display the search icon * fix: remove needless adjustements * fix: rollback to default search * chore: trigger CI * Fix sticky header (#1630) * Fix sticky header * regression test * maybe fix missing sidebar? (#1632) * maybe fix missing sidebar? * simplify * purge internal defaults & use theme config setting * formatting * refactor and simplify toctree code * DOC: Add missing "footer_center" in layout overview diagram (#1640) * Make bootstrap globally available (#1639) * Make bootstrap globally available * Include docs about bootstrap programmatic API * Add Brightway to Featured Example Gallery Grid (#1580) * initial commit * test: the png images are not build during tests --------- Co-authored-by: Rambaud Pierrick <[email protected]> * fix: move the release instructions to the repository (#1621) * fix: update text and links * fix: add code highlight * fix: wire correct file in our documentation * chore: trigger CI * remove mention of semantic versioning Co-authored-by: Daniel McCloy <[email protected]> * refactor: lint * Update RELEASE.md --------- Co-authored-by: Daniel McCloy <[email protected]> * Make search event listener only trigger with “K”/“k” (#1646) * More speedups to section TOC rendering (#1642) * small refactor, comments, cleanup * docstring cleanups * mark as unsafe for parallel write * Update src/pydata_sphinx_theme/toctree.py * Allow only theme_footer_center to be set (#1653) * fix: allow user to control the back-to-top button presence (#1616) * fix: put the btt button closer to age bottom * test: remove the btt button to check * test: fallback to default behaviour * refactor: rollback to previous state * use proper variable name * Update src/pydata_sphinx_theme/theme/pydata_sphinx_theme/layout.html --------- Co-authored-by: Daniel McCloy <[email protected]> * remove toggle button for secondary sidebar if empty (#1637) * in CIs, pin sphinx dev temporarily * bump: 0.15.1 -> 0.15.2 * bump version to dev * FIX make theme switcher have consistent widths (#1651) * unpin sphinx in CI (#1665) * FIX make search button closer to other icons in topbar (#1659) * Build(deps): Bump actions/cache from 3 to 4 (#1667) Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * update dependabot labels (#1668) * only do security updates for NPM (#1674) * Restore search snippet highlights in search results page (#1678) * Apply default_mode to the html data-theme attribute (#1663) * Don't try to populate version switcher w/ relative path on local static site (#1660) * Don't try to populate version switcher on static sites * Fix comment spelling * Update src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js --------- Co-authored-by: Daniel McCloy <[email protected]> * handle null result from queryselector (#1683) fix queryselector * Add pst-header-nav-item id to fix tests --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Daniel McCloy <[email protected]> Co-authored-by: Angus Hollands <[email protected]> Co-authored-by: Sebastiaan Huber <[email protected]> Co-authored-by: Tania Allard <[email protected]> Co-authored-by: Peyton Murray <[email protected]> Co-authored-by: Rambaud Pierrick <[email protected]> Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: Joris Van den Bossche <[email protected]> Co-authored-by: Michael Wisely <[email protected]> Co-authored-by: Michael Weinold <[email protected]> Co-authored-by: Philipp A <[email protected]> Co-authored-by: Colin Marquardt <[email protected]> Co-authored-by: Pierre Marchand <[email protected]> Co-authored-by: Yao Xiao <[email protected]> Co-authored-by: Charles <[email protected]> Co-authored-by: David Stansby <[email protected]>
1 parent 97f939b commit 931b9ab

File tree

84 files changed

+869
-316
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+869
-316
lines changed

.github/dependabot.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
version: 2
22
updates:
3-
# Maintain dependencies for GitHub Actions
3+
# GitHub Actions
44
- package-ecosystem: "github-actions"
55
directory: "/"
66
schedule:
7-
# Check for updates to GitHub Actions every week
87
interval: "weekly"
8+
labels:
9+
- "tag: dependencies"
10+
- "tag: CI"
11+
# npm
12+
- package-ecosystem: "npm"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
labels:
17+
- "tag: dependencies"
18+
- "tag: javascript"
19+
open-pull-requests-limit: 0 # security updates only

.github/workflows/prerelease.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python-version: ["3.8", "3.9", "3.10", "3.11"]
16+
python-version: ["3.9", "3.10", "3.11", "3.12"]
1717

1818
steps:
1919
- uses: actions/checkout@v4
2020

2121
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v4
22+
uses: actions/setup-python@v5
2323
with:
2424
python-version: ${{ matrix.python-version }}
2525
cache: "pip"

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Checkout source
1818
uses: actions/checkout@v4
1919
- name: Set up Python 3.9
20-
uses: actions/setup-python@v4
20+
uses: actions/setup-python@v5
2121
with:
2222
python-version: "3.9"
2323
- name: Install gettext for translations

.github/workflows/tests.yml

+24-22
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525
strategy:
2626
matrix:
2727
os: [ubuntu-latest]
28-
python-version: ["3.11"]
28+
python-version: ["3.12"]
2929
runs-on: ${{ matrix.os }}
3030
steps:
3131
- uses: actions/checkout@v4
3232
- name: Setup Python
33-
uses: actions/setup-python@v4
33+
uses: actions/setup-python@v5
3434
with:
3535
python-version: ${{ matrix.python-version }}
3636
cache: "pip"
@@ -44,22 +44,22 @@ jobs:
4444
fail-fast: false
4545
matrix:
4646
os: [ubuntu-latest]
47-
python-version: ["3.8", "3.9", "3.10", "3.11"]
47+
python-version: ["3.9", "3.10", "3.11", "3.12"]
4848
sphinx-version: [""]
4949
include:
5050
# macos test
5151
- os: macos-latest
52-
python-version: "3.11"
52+
python-version: "3.12"
5353
# windows test
5454
- os: windows-latest
55-
python-version: "3.11"
55+
python-version: "3.12"
5656
# old Sphinx test
5757
- os: ubuntu-latest
58-
python-version: "3.8"
58+
python-version: "3.9"
5959
sphinx-version: "old"
6060
# dev Sphinx test
6161
- os: ubuntu-latest
62-
python-version: "3.11"
62+
python-version: "3.12"
6363
sphinx-version: "dev"
6464
# needed to cache the browsers for the accessibility tests
6565
env:
@@ -69,7 +69,7 @@ jobs:
6969
steps:
7070
- uses: actions/checkout@v4
7171
- name: Setup Python
72-
uses: actions/setup-python@v4
72+
uses: actions/setup-python@v5
7373
with:
7474
python-version: ${{ matrix.python-version }}
7575
cache: "pip"
@@ -93,7 +93,7 @@ jobs:
9393
- name: Run tests
9494
run: pytest -m "not a11y" --color=yes --cov --cov-report=xml
9595
- name: Upload to Codecov
96-
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
96+
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
9797
uses: codecov/codecov-action@v3
9898
with:
9999
token: ${{ secrets.CODECOV_TOKEN }}
@@ -102,7 +102,7 @@ jobs:
102102
# note I am setting this on top of the Python cache as I could not find
103103
# how to set the hash key on the python one
104104
- name: Set up browser cache (for accessibility tests)
105-
uses: actions/cache@v3
105+
uses: actions/cache@v4
106106
with:
107107
path: |
108108
${{ github.workspace }}/pw-browsers
@@ -111,7 +111,7 @@ jobs:
111111
${{ runner.os }}-pw-
112112
113113
- name: Run accessibility tests with playwright
114-
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
114+
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
115115
run: |
116116
nox -s a11y
117117
continue-on-error: true
@@ -123,15 +123,17 @@ jobs:
123123
fail-fast: false
124124
matrix:
125125
os: [ubuntu-latest, macos-latest, windows-latest]
126-
python-version: ["3.11"]
126+
python-version: ["3.12"]
127127
sphinx-version: [""]
128128
include:
129129
- os: ubuntu-latest
130-
python-version: "3.8"
130+
python-version: "3.9"
131131
sphinx-version: "old"
132-
- os: ubuntu-latest
133-
python-version: "3.11"
134-
sphinx-version: "dev"
132+
# crash with myst parser
133+
# will be restored when myst will be dropped from our documentation
134+
# - os: ubuntu-latest
135+
# python-version: "3.12"
136+
# sphinx-version: "dev"
135137
env:
136138
SPHINX_VERSION: ${{ matrix.sphinx-version }}
137139
runs-on: ${{ matrix.os }}
@@ -141,7 +143,7 @@ jobs:
141143
# using 12rambau fork until then
142144
- uses: 12rambau/setup-pandoc@test
143145
- name: Setup Python
144-
uses: actions/setup-python@v4
146+
uses: actions/setup-python@v5
145147
with:
146148
python-version: ${{ matrix.python-version }}
147149
cache: "pip"
@@ -162,12 +164,12 @@ jobs:
162164
strategy:
163165
matrix:
164166
os: [ubuntu-latest]
165-
python-version: ["3.11"]
167+
python-version: ["3.12"]
166168
runs-on: ${{ matrix.os }}
167169
steps:
168170
- uses: actions/checkout@v4
169171
- name: Setup Python
170-
uses: actions/setup-python@v4
172+
uses: actions/setup-python@v5
171173
with:
172174
python-version: ${{ matrix.python-version }}
173175
cache: "pip"
@@ -205,12 +207,12 @@ jobs:
205207
strategy:
206208
matrix:
207209
os: [ubuntu-latest]
208-
python-version: ["3.11"]
210+
python-version: ["3.12"]
209211
runs-on: ${{ matrix.os }}
210212
steps:
211213
- uses: actions/checkout@v4
212214
- name: Setup Python
213-
uses: actions/setup-python@v4
215+
uses: actions/setup-python@v5
214216
with:
215217
python-version: ${{ matrix.python-version }}
216218
cache: "pip"
@@ -223,7 +225,7 @@ jobs:
223225
- name: Generate a profile
224226
run: nox -s profile
225227
continue-on-error: true
226-
- uses: actions/upload-artifact@v3
228+
- uses: actions/upload-artifact@v4
227229
with:
228230
name: profile-results
229231
path: profile.svg

.pre-commit-config.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ repos:
99
hooks:
1010
- id: prettier
1111
# Exclude the HTML, since it doesn't understand Jinja2
12-
# exclude also the webpack.congo.js file has it embed complete url dificult to prettify
13-
exclude: .+\.html|webpack\.config\.js
12+
# exclude also the webpack.config.js file has it embed complete url dificult to prettify
13+
# exclude the pytest-regressions folder tests/test_ally
14+
exclude: .+\.html|webpack\.config\.js|tests/test_a11y/
1415

1516
- repo: https://github.com/psf/black
1617
rev: 22.12.0

RELEASE.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Release instructions
2+
3+
This page contains the steps to make a release and some helpful resources to get you started.
4+
5+
Create an issue and copy/paste the steps below to release a new version. Close the issue when it is done.
6+
7+
These steps should be taken in order to create a new release![^release-refs]
8+
9+
```md
10+
**Double check for quality-control**
11+
12+
- [ ] There are no [open issues with a `impact: block-release` label](https://github.com/pydata/pydata-sphinx-theme/labels/impact%3A%20block-release)
13+
14+
**Prepare the codebase for a new version**
15+
16+
- [ ] Bump `__version__` in [`__init__.py`](https://github.com/pydata/pydata-sphinx-theme/blob/main/src/pydata_sphinx_theme/__init__.py#L16)
17+
- [ ] Update our [version switcher `.json` file](https://github.com/pydata/pydata-sphinx-theme/blob/main/docs/_static/switcher.json) with the new version
18+
- [ ] Make a release commit: `git commit -m 'bump: 0.1.9 → 0.2.0'`
19+
- [ ] Push the RLS commit `git push upstream main`
20+
- [ ] If a **release candidate** is needed, tick this box when we're now ready for a full release.
21+
22+
**Make the release**
23+
24+
- [ ] [Start a new GitHub release](https://github.com/pandas-dev/pydata-sphinx-theme/releases/new)
25+
- Call the release the current version, e.g. `v0.2.0`
26+
- In the **`Choose a Tag:`** dropdown, type in the release name (e.g., `v0.2.0`) and click "Create new tag"
27+
- In the **`Target:`** dropdown, pin it to the release commit that you've just pushed.
28+
- Generate the automatic release notes, eventually manually specify the previous version (useful when several release candidate have been made)
29+
- [ ] Confirm that the release completed
30+
- [The `publish` github action job](https://github.com/pydata/pydata-sphinx-theme/blob/main/.github/workflows/publish.yml#L31) has completed successfully in the [actions tab](https://github.com/pydata/pydata-sphinx-theme/actions).
31+
- [The PyPI version is updated](https://pypi.org/project/pydata-sphinx-theme/)
32+
- [ ] Hide the previous patch version build in the RDT interface if needed.
33+
- [ ] Celebrate, you're done!
34+
35+
[^release-refs]: Taken from [the release checklist](https://github.com/pydata/pydata-sphinx-theme/blob/main/RELEASE.md). See [the release documentation](https://pydata-sphinx-theme.readthedocs.io/en/latest/contribute/policies.html#release-policy) for an overview of release processes.
36+
```

docs/_static/gallery.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
- title: Bokeh
1212
link: https://docs.bokeh.org/en/latest/
1313
img-bottom: ../_static/gallery/bokeh.png
14+
- title: Brightway
15+
link: https://docs.brightway.dev/en/latest/
16+
img-bottom: ../_static/gallery/brightway.png
1417
- title: Jupyter
1518
link: https://docs.jupyter.org/en/latest/
1619
img-bottom: ../_static/gallery/jupyter.png

docs/_static/switcher.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
"url": "https://pydata-sphinx-theme.readthedocs.io/en/latest/"
55
},
66
{
7-
"name": "0.14.4 (stable)",
8-
"version": "v0.14.4",
7+
"name": "0.15.2 (stable)",
8+
"version": "v0.15.2",
99
"url": "https://pydata-sphinx-theme.readthedocs.io/en/stable/",
1010
"preferred": true
1111
},
12+
{
13+
"name": "0.14.4",
14+
"version": "v0.14.4",
15+
"url": "https://pydata-sphinx-theme.readthedocs.io/en/v0.14.4/"
16+
},
1217
{
1318
"name": "0.13.3",
1419
"version": "v0.13.3",
@@ -23,10 +28,5 @@
2328
"name": "0.11.0",
2429
"version": "v0.11.0",
2530
"url": "https://pydata-sphinx-theme.readthedocs.io/en/v0.11.0/"
26-
},
27-
{
28-
"name": "0.10.1",
29-
"version": "v0.10.1",
30-
"url": "https://pydata-sphinx-theme.readthedocs.io/en/v0.10.1/"
3131
}
3232
]

docs/community/practices/release.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Anybody is encouraged to make a new release if:
1919

2020
- It has been more than a month since the last release.
2121
- OR a significant change has been made to our code that warrants a release.
22-
- AND there are no open issues with a [{guilabel}`block-release`](https://github.com/pydata/pydata-sphinx-theme/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Ablock-release) label.
22+
- AND there are no open issues with a [{guilabel}`impact: block-release`](https://github.com/pydata/pydata-sphinx-theme/labels/impact%3A%20block-release) label.
2323

2424
### Release candidates
2525

@@ -35,7 +35,7 @@ Follow these steps to make a release:
3535

3636
- (optionally) **Create a [GitHub milestones](https://github.com/pydata/pydata-sphinx-theme/milestones)** to organize the issues that should be resolved as part of a new release.
3737
- **Decide if it's time** to make a release be reading [](releases:when) and decide if it is time for a release.
38-
- **Copy the release checklist into a new issue**. We have [a release checklist in our wiki](https://github.com/pydata/pydata-sphinx-theme/wiki/Release-checklist#release-instructions).
38+
- **Copy the [release checklist](https://github.com/pydata/pydata-sphinx-theme/blob/main/RELEASE.md) into a new issue**.
3939
- **Complete the checklist**. That's it!
4040

4141
## Choosing a version increment

docs/community/topics/bootstrap.rst

+1
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,4 @@ JavaScript
6060
^^^^^^^^^^
6161

6262
- Data attributes for all JavaScript plugins are now namespaced to help distinguish Bootstrap functionality from third parties and your code. For example, we use ``data-bs-toggle`` instead of ``data-toggle``.
63+
- Bootstrap's `Programmatic API <https://getbootstrap.com/docs/5.0/getting-started/javascript/#programmatic-api>`_, ``bootstrap``, is also available. This API can be useful for initializing opt-in components that are not initialized by default such as `Popovers <https://getbootstrap.com/docs/5.0/components/popovers/#overview>`_.

docs/conf.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,16 @@
184184
# "content_footer_items": ["test", "test"],
185185
"footer_start": ["copyright"],
186186
"footer_center": ["sphinx-version"],
187-
# "secondary_sidebar_items": ["page-toc"], # Remove the source buttons
187+
"secondary_sidebar_items": {
188+
"**/*": ["page-toc", "edit-this-page", "sourcelink"],
189+
"examples/no-sidebar": [],
190+
},
188191
"switcher": {
189192
"json_url": json_url,
190193
"version_match": version_match,
191194
},
192195
"navigation_with_keys": False,
196+
# "back_to_top_button": False,
193197
# "search_bar_position": "navbar", # TODO: Deprecated - remove in future version
194198
}
195199

docs/examples/gallery.md

-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ Thanks for your support!
2525
2626
- title: Binder
2727
link: https://mybinder.readthedocs.io/en/latest/index.html
28-
- title: Brightway
29-
link: https://docs.brightway.dev/en/latest/
3028
- title: cashocs
3129
link: https://cashocs.readthedocs.io/en/stable/
3230
- title: CuPy

docs/examples/in-page-toc.rst

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
:html_theme.sidebar_secondary.remove: true
2+
3+
Test of in-page TOC with no right sidebar
4+
=========================================
5+
6+
This page tests that the local contents directive looks okay.
7+
8+
.. attention::
9+
10+
We **do not recommend** using this directive on pages that use this theme
11+
because PyData Theme provides an in-page table of contents in the right sidebar
12+
by default.
13+
14+
If you do choose to use an inline, in-page table of contents, we recommend that
15+
you turn off the right sidebar as follows.
16+
17+
.. contents:: Page contents
18+
:local:
19+
20+
21+
Add a local table of contents (in-page)
22+
---------------------------------------
23+
24+
Add the local table of contents directive near the top of your ``.rst`` page:
25+
26+
.. code-block:: rst
27+
28+
.. contents:: Page contents
29+
:local:
30+
31+
This directive will generate a table of contents for the section where this was
32+
added, as shown on this page.
33+
34+
35+
Turn off the right sidebar for a single page
36+
--------------------------------------------
37+
38+
On the very top line of your ``.rst`` file, insert the following line:
39+
40+
.. code-block:: rst
41+
42+
:html_theme.sidebar_secondary.remove: true
43+
44+
This will render the page without the right sidebar, also known as the secondary
45+
sidebar, which contains the table of contents for that page.
46+
47+
Be aware that if you remove the sidebar you may also remove the "Edit on ..."
48+
and "Show source" links for that page, since by default those are configured for
49+
the right sidebar.

docs/examples/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ See the sections in the primary sidebar and below to explore.
2929

3030
no-sidebar
3131
persistent-search-field
32+
in-page-toc
3233
subpages/index
3334
mult_headers
3435
Link to an external site <https://jupyterbook.org/>

0 commit comments

Comments
 (0)