Skip to content

Commit 9aa758b

Browse files
committed
refactor: Never show full object path in ToC entry
1 parent 38b317f commit 9aa758b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/mkdocstrings_handlers/python/templates/material/_base/attribute.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
{% filter heading(heading_level,
5959
role="data" if attribute.parent.kind.value == "module" else "attr",
6060
id=html_id,
61-
toc_label=attribute.path if config.show_root_full_path else attribute.name,
61+
toc_label=attribute.name,
6262
hidden=True) %}
6363
{% endfilter %}
6464
{% endif %}

src/mkdocstrings_handlers/python/templates/material/_base/class.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
{% filter heading(heading_level,
6363
role="class",
6464
id=html_id,
65-
toc_label=class.path if config.show_root_full_path else class.name,
65+
toc_label=class.name,
6666
hidden=True) %}
6767
{% endfilter %}
6868
{% endif %}

src/mkdocstrings_handlers/python/templates/material/_base/function.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
{% filter heading(heading_level,
5757
role="function",
5858
id=html_id,
59-
toc_label=function.path if config.show_root_full_path else function.name,
59+
toc_label=function.name,
6060
hidden=True) %}
6161
{% endfilter %}
6262
{% endif %}

src/mkdocstrings_handlers/python/templates/material/_base/module.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
{% filter heading(heading_level,
4545
role="module",
4646
id=html_id,
47-
toc_label=module.path if config.show_root_full_path else module.name,
47+
toc_label=module.name,
4848
hidden=True) %}
4949
{% endfilter %}
5050
{% endif %}

0 commit comments

Comments
 (0)