docs: switch to sphinx-book-theme for unified right-side project TOC

sphinx_rtd_theme only renders left-side navigation. Switch to
sphinx-book-theme which puts the full project TOC on the right and
leaves the reading area centered.

conf.py:
- html_theme = 'sphinx_book_theme'
- html_sidebars = {'**': []} hides the left sidebar so the right TOC
  is the single navigation surface
- show_toc_level=3 expands subpages; show_navbar_depth=2 controls top nav

requirements.txt: sphinx-rtd-theme → sphinx-book-theme>=1.1
This commit is contained in:
russell@unturf.com 2026-05-04 09:13:14 -04:00
parent 850e59d16e
commit 6ad0c9d8e3
No known key found for this signature in database
2 changed files with 15 additions and 2 deletions

View file

@ -35,10 +35,23 @@ napoleon_numpy_docstring = True
napoleon_attr_annotations = True
# HTML output
html_theme = "sphinx_rtd_theme"
html_theme = "sphinx_book_theme"
html_static_path = ["_static"]
html_title = "Aborist API Reference"
# Move the project TOC to the right side. Reading area stays centered;
# left-side primary sidebar is hidden so the right TOC is the single
# navigation surface.
html_theme_options = {
"show_toc_level": 3,
"show_navbar_depth": 2,
"use_sidenotes": True,
"primary_sidebar_end": [],
}
html_sidebars = {
"**": [], # empty left sidebar — unified TOC lives on the right
}
# Suppress warnings for missing references
suppress_warnings = ["ref.doc"]

View file

@ -1,3 +1,3 @@
# Sphinx documentation build dependencies for Read the Docs
sphinx>=8.0
sphinx-rtd-theme>=3.0
sphinx-book-theme>=1.1