✨ feat(ToC): implement setting hierarchy for ToC
Related: #128 and #120
This commit is contained in:
parent
d6a5b1ab93
commit
695e40be70
@ -204,6 +204,10 @@ katex = false
|
||||
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://github.com/welpo/tabi/pull/128
|
||||
quick_navigation_buttons = false
|
||||
|
||||
# Add a Table of Contents to posts, right below the title and metadata.
|
||||
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://github.com/welpo/tabi/pull/128
|
||||
toc = false
|
||||
|
||||
# Date format used when listing posts (main page, /blog section, tag posts list…)
|
||||
# Default is "6th July 2049" in English and "%d %B %Y" in other languages.
|
||||
long_date_format = "%d %B %Y"
|
||||
|
@ -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 %}
|
||||
|
||||
|
@ -89,6 +89,10 @@ katex = false
|
||||
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://github.com/welpo/tabi/pull/128
|
||||
quick_navigation_buttons = false
|
||||
|
||||
# Add a Table of Contents to all posts, right below the title and metadata.
|
||||
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://github.com/welpo/tabi/pull/128
|
||||
# toc = false
|
||||
|
||||
# Date format used when listing posts (main page, /blog section, tag posts list…)
|
||||
# Default is "6th July 2049" in English and "%d %B %Y" in other languages.
|
||||
# long_date_format = "%d %B %Y"
|
||||
|
Loading…
x
Reference in New Issue
Block a user