{#- Zola exposes `page` or `section` depending on the template, and neither in the 404. Resolving the pair here rather than per-tag is what keeps every page from silently inheriting the site-wide title and description, which is both useless to a reader scanning search results and a duplicate-content signal to the engine producing them. -#} {%- block seo -%} {%- set_global doc_title = config.title -%} {%- set_global doc_desc = config.description -%} {%- set_global is_article = false -%} {%- if page is defined -%} {%- set_global doc_title = page.title -%} {%- set_global is_article = true -%} {%- if page.description -%}{%- set_global doc_desc = page.description -%}{%- endif -%} {%- elif section is defined and section.title -%} {%- set_global doc_title = section.title -%} {%- if section.description -%}{%- set_global doc_desc = section.description -%}{%- endif -%} {%- endif -%} {%- endblock seo -%} {%- set canonical = current_url | default(value=config.base_url) -%}