{%- capture fullUrl -%}{{ meta.url }}{{ page.url }}{%- endcapture -%}
{%- capture pageTitle -%}
  {% if page.url | isPost %}
    {{ title }}
  {% elsif title %}
    {{ title }} • {{ meta.siteName }}
  {% else %}
    {{ meta.siteName }}
  {% endif %}
{%- endcapture -%}
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{ pageTitle }}</title>
    <link rel="preload" href="/assets/fonts/Poppins-Bold.min.woff2" as="font" type="font/woff2" crossorigin>
    <link rel="preload" href="/assets/fonts/Poppins-Regular.min.woff2" as="font" type="font/woff2" crossorigin>
    <link rel="stylesheet" href="/assets/styles/index.css?v={% appVersion %}" type="text/css" />
    <script async data-id="101449513" src="/23af0256fe76a.js"></script>
    <link rel="canonical" href="{{ fullUrl }}" />
    <meta property="og:title" content="{{ pageTitle }}" />
    <meta name="description" content="{% if description %}{{ description }}{% else %}{{ meta.siteDescription }}{% endif %}" />
    <meta property="og:description" content="{% if description %}{{ description }}{% else %}{{ meta.siteDescription }}{% endif %}" />
    <meta property="og:type" content="article" />
    <meta property="og:url" content="{{ fullUrl }}" />
    <meta
      property="og:image"
      content="{%- if schema == 'blog' %}{{ meta.url }}/assets/img/social-preview/{{ title | slugify }}-preview.jpeg{%- else -%}{{ meta.meta_data.opengraph_default }}{% endif -%}"
    />
    <meta name="theme-color" content="{{ meta.themeColor }}" />
    <meta name="generator" content="{{ eleventy.generator }}">
    <meta name="robots" content="noai, noimageai">
    <link href="/assets/icons/favicon.ico?v={% appVersion %}" rel="icon" sizes="any">
    <link href="/assets/icons/favicon.svg?v={% appVersion %}" rel="icon" type="image/svg+xml">
    <link href="/assets/icons/apple-touch-icon.png?v={% appVersion %}" rel="apple-touch-icon">
    <link rel="webmention" href="https://webmention.io/coryd.dev/webmention" />
    <link rel="pingback" href="https://webmention.io/coryd.dev/xmlrpc" />
    <link type="application/atom+xml" rel="alternate" title="{{ meta.siteName }}" href="https://feedpress.me/coryd">
    <link rel="alternate" type="application/json" title="{{ meta.siteName }}" href="https://feedpress.me/coryd.json" />
    <link rel="alternate" href="https://feedpress.me/coryd-follow" title="Cory Dransfeldt's activity feed" type="application/rss+xml">
    <link rel="alternate" href="https://feedpress.me/coryd-links" title="Cory Dransfeldt's links feed" type="application/rss+xml">
    <link rel="alternate" href="https://feedpress.me/coryd-books" title="Cory Dransfeldt's books feed" type="application/rss+xml">
    <link type="text/plain" rel="author" href="https://coryd.dev/humans.txt" />
      {% if schema == 'blog' %}
      <script type="application/ld+json">
        {
          "@context": "https://schema.org",
          "@type": "BlogPosting",
          "mainEntityOfPage": {
            "@type": "WebPage"
          },
          "isPartOf": {
            "@id": "{{ meta.url }}#website"
          },
          "@id": "{{ fullUrl }}",
          "headline": "{{ pageTitle }}",
          "description": "{% if description %}{{ description }}{% else %}{{ meta.siteDescription }}{% endif %}",
          "image": "{% if image %}{{ image }}{% else %}{{ meta.meta_data.opengraph_default }}{% endif %}",
          "inLanguage": "{{ meta.locale }}",
          "publisher": {
            "@type": "{{ meta.siteType }}",
            "name": "{{ meta.author }}",
            "url": "{{ meta.url }}"
          },
          "author": {
            "@type": "Person",
            "name": "{{ meta.author }}"
          },
          "datePublished": "{{ page.date | isoDateOnly: '.' }}"
        }
      </script>
      {% else %}
      <script type="application/ld+json">
        {
          "@context": "https://schema.org",
          "@graph": [
            {
              "@type": "WebSite",
              "@id": "{{ meta.url }}#website",
              "url": "{{ meta.url }}",
              "name": "{{ pageTitle }}",
              "description": "{% if description %}{{ description }}{% else %}{{ meta.siteDescription }}{% endif %}",
              "inLanguage": "{{ meta.locale }}"
            }
          ]
        }
      </script>
      {% endif %}
    <noscript>
      <style>.client-side {display:none}</style>
      <p><img width="1" height="1" src="/7afb285ad050d" /></p>
    </noscript>
  </head>
  <body>
    <script>
      (() => {
        const currentTheme = sessionStorage?.getItem('theme');
        const prefersDarkScheme = window.matchMedia('(prefers-color-scheme: dark)').matches;
        const root = document.getElementsByTagName('html')[0];
        if (!currentTheme) sessionStorage?.setItem('theme', (prefersDarkScheme ? 'dark' : 'light'))
        if (currentTheme === 'dark') {
          root.classList.add('theme__dark')
        } else if (currentTheme === 'light') {
          root.classList.add('theme__light')
        } else if (prefersDarkScheme) {
          root.classList.add('theme__dark')
        } else if (!prefersDarkScheme) {
          root.classList.add('theme__light')
        }
      })();
    </script>
    {{ content }}
  </body>
</html>
