From 2cc999d63f016caffae89c5000030ea86261f245 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Fri, 4 Dec 2020 18:28:23 +0000 Subject: [PATCH] add support for globaltoc_includeinternal, closes #86 --- docs/customization.rst | 2 ++ sphinx_material/sphinx_material/globaltoc.html | 2 ++ sphinx_material/sphinx_material/theme.conf | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/customization.rst b/docs/customization.rst index dba7f1741..e535d561d 100644 --- a/docs/customization.rst +++ b/docs/customization.rst @@ -50,6 +50,8 @@ Configuration Options If true, TOC entries that are not ancestors of the current page are collapsed. ``globaltoc_includehidden`` If true, the global TOC tree will also contain hidden entries. +``globaltoc_includeinternal`` + If false, the global TOC tree will not contain internal section headings ``theme_color`` The theme color for mobile browsers. Hex Color without the leading #. ``color_primary`` diff --git a/sphinx_material/sphinx_material/globaltoc.html b/sphinx_material/sphinx_material/globaltoc.html index 675cb9adb..0895847ae 100644 --- a/sphinx_material/sphinx_material/globaltoc.html +++ b/sphinx_material/sphinx_material/globaltoc.html @@ -3,6 +3,7 @@ {% set toctree_nodes = derender_toc(toctree, False) %} {# TODO: Fallback to toc? #} diff --git a/sphinx_material/sphinx_material/theme.conf b/sphinx_material/sphinx_material/theme.conf index 8d4fb59cf..0de3e3020 100644 --- a/sphinx_material/sphinx_material/theme.conf +++ b/sphinx_material/sphinx_material/theme.conf @@ -48,6 +48,8 @@ globaltoc_depth = 1 globaltoc_collapse = true # If true, the global TOC tree will also contain hidden entries globaltoc_includehidden = true +# If false, the global TOC tree will not contain internal section headings +globaltoc_includeinternal = true # Colors # The theme color for mobile browsers. Hex color. @@ -109,4 +111,4 @@ version_json = "versions.json" # Table classes to _not_ strip. Must be a list. Classes on this list are *not* # removed from tables. All other classes are removed, and only tables with outclasses # are styled by default. -table_classes = \ No newline at end of file +table_classes =