{%- set page_or_section = page | default(value=section) -%} {# prepare parameters for evaluate_setting_priority macro #} {%- set page_s = page | default(value="") -%} {%- set section_s = section | default(value="") -%} {# Quick navigation buttons #} {% if macros_settings::evaluate_setting_priority(setting="quick_navigation_buttons", page=page_s, section=section_s, default_global_value=false) == "true" %}
{# Button to go show a floating Table of Contents #} {% if page_or_section.toc %}
{{ macros_toc::toc(page=page_or_section, header=false, language_strings=language_strings) }}
{% endif %} {# Button to go to the comment section #} {% if comment_system %} {% endif %} {# Button to go to the top of the page #}
{% endif %} {# Add KaTeX functionality #} {%- if macros_settings::evaluate_setting_priority(setting="katex", page=page_s, section=section_s, default_global_value=false) == "true" -%} {%- endif -%} {# Load mermaid.js #} {%- if macros_settings::evaluate_setting_priority(setting="mermaid", page=page_s, section=section_s, default_global_value=false) == "true" -%} {%- if config.extra.serve_local_mermaid | default(value=true) -%} {%- else -%} {%- endif -%} {%- endif -%} {# Add copy button to code blocks #} {%- if macros_settings::evaluate_setting_priority(setting="copy_button", page=page_s, section=section_s, default_global_value=true) == "true" -%} {#- Add hidden HTML elements with the translated strings for the button's interactions -#} {%- endif -%} {# JavaScript to use the "Show source or path" on code blocks shortcode: https://welpo.github.io/tabi/blog/shortcodes/#show-source-or-path #} {%- if macros_settings::evaluate_setting_priority(setting="add_src_to_code_block", page=page_s, section=section_s, default_global_value=false) == "true" -%} {%- endif -%} {# Add backlinks to footnotes #} {%- if macros_settings::evaluate_setting_priority(setting="footnote_backlinks", page=page_s, section=section_s, default_global_value=false) == "true" -%} {%- endif -%}