feat(ToC): implement setting hierarchy for ToC

Related: #128 and #120
This commit is contained in:
welpo
2023-09-07 01:59:28 +02:00
parent d6a5b1ab93
commit 695e40be70
3 changed files with 11 additions and 2 deletions

View File

@@ -19,7 +19,8 @@
"katex",
"quick_navigation_buttons",
"show_reading_time",
"show_remote_changes"
"show_remote_changes",
"toc",
] %}
<table>
@@ -95,7 +96,7 @@
{% endif %}
{# Optional table of contents below the header #}
{% if page.extra.toc | default(value=false) and page.toc %}
{% if page.toc and macros_settings::evaluate_setting_priority(setting="toc", page=page, default_global_value=false) == "true" %}
{{ macros_toc::toc(page=page, header=true) }}
{% endif %}