Skip to content

Commit f3a1722

Browse files
authored
Re-add improved toc navigation with icons (#682)
* TOC state is now persisted across page navigation and reloads, allowing multiple sections to remain expanded simultaneously. Changed sidebar TOC generation from HTML/Jinja templates to Python (``sidebartoc.py``) to enable Furo's navigation enhancements. * CrateDB Npgsql docs were removed.
1 parent 14efdb6 commit f3a1722

File tree

23 files changed

+370
-201
lines changed

23 files changed

+370
-201
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ dist
2121
eggs
2222
node_modules*
2323
yarn-error.log
24+
_*

CHANGES.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ CHANGES
55

66
Unreleased
77
----------
8+
- Re-added TOC expand/collapse icons with improved navigation behavior: TOC
9+
state is now persisted across page navigation and reloads, allowing multiple
10+
sections to remain expanded simultaneously. Changed sidebar TOC generation
11+
from HTML/Jinja templates to Python (``sidebartoc.py``) to enable Furo's
12+
navigation enhancements. Originally introduced in 0.43.0, reverted in 0.44.0.
13+
- CrateDB Npgsql docs were removed.
814

915
2025/12/19 0.45.0
1016
-----------------

docs/index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@ The legacy feature gallery exclusively uses reStructuredText.
5757
.. toctree::
5858
:maxdepth: 1
5959

60+
headings
6061
admonitions
6162
codesnippets
62-
diagrams
63-
glossary
64-
headings
65-
images
6663
lists
67-
projects
68-
subpage
6964
tables
65+
images
66+
diagrams
7067
typography
68+
subpage
69+
projects
70+
tests/index
7171

7272

7373

File renamed without changes.

docs/tests/index.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.. _tests:
2+
3+
#########################
4+
Navigation bar test pages
5+
#########################
6+
7+
1. Clicking the title should expand the section and navigate to the section page
8+
2. Clicking just the icon should expand but not navigate to the section
9+
3. Clicking just the icon for an expanded section should collapse that section and leave other expanded sections expanded
10+
4. Hovering the mouse over an icon should show a fade background behind the icon
11+
5. Hovering the mouse over the title should show a fade background behind the title and the icon
12+
6. The current page should be highlighted in the navigation bar as the user navigates through the pages below.
13+
14+
15+
**Pages:**
16+
17+
.. toctree::
18+
:titlesonly:
19+
:glob:
20+
21+
section1/index
22+
section2/index
23+
*

docs/tests/section1/index.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#########
2+
Section 1
3+
#########
4+
5+
.. toctree::
6+
:maxdepth: 1
7+
8+
subpage1
9+
subpage2

docs/tests/section1/subpage1.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
##########
2+
Subpage 1
3+
##########
4+
5+
Test subpage 1.

docs/tests/section1/subpage2.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
##########
2+
Subpage 2
3+
##########
4+
5+
Test subpage 2.

docs/tests/section2/index.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
############
2+
Section 2
3+
############
4+
5+
.. toctree::
6+
:maxdepth: 1
7+
8+
section21/index
9+
subpage1
10+
subpage2
11+
12+
Hi
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
############
2+
Section 2.1
3+
############
4+
5+
.. toctree::
6+
:maxdepth: 1
7+
8+
subpage1
9+
subpage2

0 commit comments

Comments
 (0)