{%- if macros_settings::evaluate_setting_priority(setting="enable_csp", page=page | default(value=""), section=section | default(value=""), default_global_value="true") == "true" -%} {%- include "partials/content_security_policy.html" -%} {%- endif -%} {# Site title #} {%- include "partials/title.html" -%} {# Favicon #} {% if config.extra.favicon %} {% endif %} {% if config.extra.favicon_emoji %} {% endif %} {# Feeds #} {% if config.generate_feeds | default(value=config.generate_feed) %} {% if config.feed_filenames %} {# Zola 0.19 and newer #} {% for feed in config.feed_filenames %} {% if feed == "atom.xml" %} {% elif feed == "rss.xml" %} {% else %} {% endif %} {% endfor %} {% else %} {# Older Zola versions #} {% set feed_url = config.feed_filename | default(value="atom.xml") %} {% endif %} {% endif %} {# CSS #} {# Load subset of glyphs for header. Avoids flashing issue in Firefox #} {% if config.extra.enable_subset %} {% if config.extra.custom_subset == true %} {% elif lang == 'en' %} {% elif lang == 'es' %} {% endif %} {% endif %} {# Define array of CSS files to load. main.css is always loaded. #} {%- set stylesheets = [ "main.css" ] -%} {# Load extra CSS files from config.toml #} {%- if config.extra.stylesheets -%} {%- set stylesheets = stylesheets | concat(with=config.extra.stylesheets) -%} {%- endif -%} {# Load extra CSS files from page metadata #} {%- if page.extra.stylesheets -%} {%- set stylesheets = stylesheets | concat(with=page.extra.stylesheets) -%} {%- endif -%} {# Load extra CSS for custom skin #} {%- if config.extra.skin -%} {%- set stylesheets = stylesheets | concat(with='skins/' ~ config.extra.skin ~ '.css') -%} {%- endif -%} {# Load all stylesheets #} {%- for stylesheet in stylesheets %} {%- endfor %} {%- if config.extra.browser_theme_color and config.extra.browser_theme_color is iterable -%} {# Handle array values: theme_color[0] for light mode, theme_color[1] for dark mode #} {%- elif config.extra.browser_theme_color -%} {# Handle single value #} {%- endif -%} {%- if page.description %} {%- elif section.description %} {%- elif page.summary %} {%- else %} {%- endif %} {% if is_404 %} {% endif %} {# Image for social media sharing #} {%- include "partials/social_media_images.html" -%} {# Add og:locale and hreflang tags for multilingual sites #} {%- if config.languages | length > 0 and current_url %} {%- include "partials/multilingual_tags.html" -%} {%- else -%} {%- endif %} {# Set canonical URL #} {%- if current_url -%} {%- if page.extra.canonical_url or section.extra.canonical_url -%} {%- set canonical_url = page.extra.canonical_url | default(value=section.extra.canonical_url) -%} {%- elif config.extra.base_canonical_url -%} {%- set canonical_url = current_url | replace(from=config.base_url, to=config.extra.base_canonical_url) -%} {%- endif -%} {%- endif -%} {# Add canonical URL, if set #} {%- if canonical_url -%} {%- elif current_url -%} {%- endif -%} {%- if config.extra.theme_switcher and config.extra.theme_switcher == true -%} {# If JavaScript is disabled, hide the button. #} {%- endif -%} {%- if config.extra.analytics.service -%} {%- include "partials/analytics.html" -%} {%- endif -%} {# Socials #} {%- if config.extra.fediverse_creator -%} {%- endif -%} {# Search #} {%- if config.build_search_index -%} {%- if config.search.index_format -%} {%- set search_index_format = config.search.index_format -%} {%- elif config.extra.index_format -%} {# Necessary to support Zola 0.17.X, as it doesn't have access to config.search.index_format #} {# See: https://github.com/getzola/zola/issues/2165 #} {%- set search_index_format = config.extra.index_format -%} {%- else -%} {%- set search_index_format = "elasticlunr_json" -%} {%- endif -%} {%- if search_index_format == "elasticlunr_javascript" -%} {%- endif -%} {# Main search script #} {# Support correct stemming and stop word filtering in non-English search #} {%- if lang != "en" -%} {%- endif -%} {%- endif -%}