{{ page.reading_time }}{%- if lang != config.default_language %} {{ trans(key="min_read" | safe, lang=lang) }} {% else %} min read {% endif %}
{% if page.taxonomies and page.taxonomies.tags %}
{{ separator }} {%- if lang != config.default_language -%}{{ trans(key="tags" | safe, lang=lang) | capitalize }}{% else %}Tags{%- endif -%}:
{% for tag in page.taxonomies.tags %}
{{ tag }}
{%- if not loop.last -%}
,
{%- endif -%}
{% endfor %}
{% endif %}
{% if page.updated %}
{%- if lang != config.default_language %} {{ trans(key="last_updated_on" | safe, lang=lang) }} {% else %} Last updated on {% endif %} {{ macros_format_date::format_date(date=page.updated, short=true) }}
{# Show link to remote changes if enabled #}
{% set show_remote_changes = config.extra.show_remote_changes | default(value=true) %}
{% if config.extra.remote_repository_url and show_remote_changes %}
{% endif %}
{# Optional table of contents below the header #}
{% if page.extra.toc | default(value=false) and page.toc %}
{{ macros_toc::toc(page=page, header=true) }}
{% endif %}
{# The replace pattern is used to enable arbitrary locations for the Table of Contents #}
{# This is Philipp Oppermann's workaround: https://github.com/getzola/zola/issues/584#issuecomment-474329637 #}
{{ page.content | replace(from="", to=macros_toc::toc(page=page, header=false)) | safe }}
{# Check if comments are enabled #}
{% set giscus_enabled = config.extra.giscus.enabled_for_all_posts or page.extra.giscus %}
{% set utterances_enabled = config.extra.utterances.enabled_for_all_posts or page.extra.utterances %}
{% set hyvortalk_enabled = config.extra.hyvortalk.enabled_for_all_posts or page.extra.hyvortalk %}
{% set isso_enabled = config.extra.isso.enabled_for_all_posts or page.extra.isso %}
{# Ensure only one comment system is enabled #}
{# Counter for enabled comment systems #}
{% set enabled_systems = 0 %}
{# Check and count the enabled comment systems #}
{% if giscus_enabled %}
{% set comment_system = "giscus" %}
{% set enabled_systems = enabled_systems + 1 %}
{% endif %}
{% if utterances_enabled %}
{% set comment_system = "utterances" %}
{% set enabled_systems = enabled_systems + 1 %}
{% endif %}
{% if hyvortalk_enabled %}
{% set comment_system = "hyvortalk" %}
{% set enabled_systems = enabled_systems + 1 %}
{% endif %}
{% if isso_enabled %}
{% set comment_system = "isso" %}
{% set enabled_systems = enabled_systems + 1 %}
{% endif %}
{# Ensure only one comment system is enabled #}
{% if enabled_systems > 1 %}
{{ throw(message="ERROR: Multiple comment systems have been enabled for the same page. Check your config.toml and individual page settings to ensure only one comment system is activated at a time.") }}
{% endif %}
{% if comment_system %}
{% set automatic_loading = config.extra[comment_system].automatic_loading %}
{{ macros_add_comments::add_comments(comment_system=comment_system, automatic_loading=automatic_loading) }}
{% endif %}
{% if config.extra.quick_navigation_buttons or page.extra.quick_navigation_buttons %}
{# Button to go show a floating Table of Contents #}
{% if page.toc %}
{{ macros_toc::toc(page=page, header=false) }}
{% endif %}
{# Button to go to the comment section #}
{% if comment_system %}
{% endif %}
{# Button to go to the top of the page #}