From d4019239cf443393a0dd0f6deef09d05e3fbaa6f Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Sat, 30 Aug 2025 08:36:37 -0400 Subject: [PATCH] docs: add table of contents to sidebar --- doc/conf.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index db9b5185..a5655739 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -38,6 +38,23 @@ html_theme = 'alabaster' +html_theme_options = { + "description": "Backported and experimental type hints for Python", + # Make the sidebar "sticky" so that is stays visible when scrolling. + # Also makes the sidebar appear at the top of the page on mobile. + "fixed_sidebar": True, +} + +html_sidebars = { + '**': [ + 'about.html', + 'searchfield.html', + 'localtoc.html', + ] +} + +# Don't include object entries (e.g. functions, classes) in the table of contents. +toc_object_entries = False class MyTranslator(HTML5Translator): """Adds a link target to name without `typing_extensions.` prefix."""