diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html b/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html index 3f1d887e..6581d089 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html @@ -21,7 +21,7 @@ role="data" if attribute.parent.kind.value == "module" else "attr", id=html_id, class="doc doc-heading", - toc_label=(' '|safe if config.show_symbol_type_toc else '') + attribute.name, + toc_label=(' '|safe if config.show_symbol_type_toc else '') + attribute_name, ) %} {% block heading scoped %} @@ -58,7 +58,7 @@ {% filter heading(heading_level, role="data" if attribute.parent.kind.value == "module" else "attr", id=html_id, - toc_label=(' '|safe if config.show_symbol_type_toc else '') + attribute.name, + toc_label=(' '|safe if config.show_symbol_type_toc else '') + attribute_name, hidden=True, ) %} {% endfilter %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/class.html b/src/mkdocstrings_handlers/python/templates/material/_base/class.html index fb7ca764..abec9c19 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/class.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/class.html @@ -21,7 +21,7 @@ role="class", id=html_id, class="doc doc-heading", - toc_label=(' '|safe if config.show_symbol_type_toc else '') + class.name, + toc_label=(' '|safe if config.show_symbol_type_toc else '') + class_name, ) %} {% block heading scoped %} @@ -64,7 +64,7 @@ {% filter heading(heading_level, role="class", id=html_id, - toc_label=(' '|safe if config.show_symbol_type_toc else '') + class.name, + toc_label=(' '|safe if config.show_symbol_type_toc else '') + class_name, hidden=True, ) %} {% endfilter %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/function.html b/src/mkdocstrings_handlers/python/templates/material/_base/function.html index 5c2ac29e..b312e04c 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/function.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/function.html @@ -24,7 +24,7 @@ role="function", id=html_id, class="doc doc-heading", - toc_label=((' ')|safe if config.show_symbol_type_toc else '') + function.name, + toc_label=((' ')|safe if config.show_symbol_type_toc else '') + function_name, ) %} {% block heading scoped %} @@ -61,7 +61,7 @@ heading_level, role="function", id=html_id, - toc_label=((' ')|safe if config.show_symbol_type_toc else '') + function.name, + toc_label=((' ')|safe if config.show_symbol_type_toc else '') + function_name, hidden=True, ) %} {% endfilter %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/module.html b/src/mkdocstrings_handlers/python/templates/material/_base/module.html index 7d45e321..3da47e43 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/module.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/module.html @@ -21,7 +21,7 @@ role="module", id=html_id, class="doc doc-heading", - toc_label=(' '|safe if config.show_symbol_type_toc else '') + module.name, + toc_label=(' '|safe if config.show_symbol_type_toc else '') + module_name, ) %} {% block heading scoped %} @@ -46,7 +46,7 @@ {% filter heading(heading_level, role="module", id=html_id, - toc_label=(' '|safe if config.show_symbol_type_toc else '') + module.name, + toc_label=(' '|safe if config.show_symbol_type_toc else '') + module_name, hidden=True, ) %} {% endfilter %}