{% extends "base.html" %} {# Avoids the light-to-dark flash on the first visit. The theme applies a stored colour palette right at the start of , but only stores one once its JavaScript has run at the end of the page. On a first visit nothing is stored yet, so the page is drawn light and switches to dark afterwards. This stores the palette the system prefers before that, so it is applied before the first paint. Indexes and values match theme.palette. #} {# Open Graph and Twitter card tags for link previews. The preview image is set per language in extra.share (absolute URL on the Pages domain; the project.pages.drupalcode.org address redirects there). site_url, and so the canonical link and og:url, point to the Pages domain as well: the project.pages address redirects (via http), and a canonical address that redirects makes Facebook's scraper loop and drop the image. The ?v= of the image URL makes Facebook fetch a changed image again. A page can set its own preview image in its front matter (share_image, share_image_alt; the gallery page does), otherwise extra.share applies. #} {% block extrahead %} {% set social = config.extra.share %} {% set share_image = page.meta.share_image if page.meta and page.meta.share_image else social.image %} {% set share_image_alt = page.meta.share_image_alt if page.meta and page.meta.share_image_alt else social.image_alt %} {% if page.is_homepage or page.url in ["", ".", "./", "index.html"] or not page.title %} {% set share_title = config.site_name %} {% else %} {% set share_title = page.title | striptags ~ " – " ~ config.site_name %} {% endif %} {% set share_description = page.meta.description if page.meta and page.meta.description else config.site_description %} {% endblock %}