{# SEO · Open Graph · Twitter · schema.org · feeds #} {%- set site_name = site.title ?: 'GSEC' -%} {%- set is_home = page.template == 'home' -%} {%- set page_title = is_home ? site_name : page.title ~ ' · ' ~ site_name -%} {%- set desc = (page.header.summary ?: page.header.description ?: site.metadata.description ?: '')|striptags|trim -%} {%- set canonical = page.url(true, true) -%} {%- set hero = page.media[page.header.hero_image] ?? null -%} {%- set og_image = hero ? hero.url|absolute_url : url('theme://images/favicon.png', true) -%} {{ page_title }} {# Feeds RSS — global e (em editoria) da própria editoria #} {% if page.template == 'category' %} {% endif %} {# ---------------- JSON-LD ---------------- #} {% if is_home %} {% elseif page.template == 'item' %} {%- set author_name = (page.header.taxonomy.author[0] ?? page.header.author ?? site.author.name)|replace({'-': ' '})|title -%} {% endif %} {# BreadcrumbList #} {% if not is_home %} {%- set crumbs = [] -%} {%- set position = 1 -%} {%- set crumbs = crumbs|merge([{"@type":"ListItem","position":position,"name":"Início","item":base_url_absolute ~ "/"}]) -%} {% for ancestor in page.parents|reverse %} {% if ancestor.routable and ancestor.template != 'root' and ancestor.url != '/' %} {%- set position = position + 1 -%} {%- set crumbs = crumbs|merge([{"@type":"ListItem","position":position,"name":ancestor.title,"item":ancestor.url(true,true)}]) -%} {% endif %} {% endfor %} {%- set crumbs = crumbs|merge([{"@type":"ListItem","position":position + 1,"name":page.title,"item":canonical}]) -%} {% endif %}