Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

6.0 KB
Raw Blame
{%- set pageUrl = (page.url | u) -%}
{%- set canonical = canonicalUrl or (site.origin + pageUrl) -%}
{%- set metaTitle = (seoTitle or (title + " — " + site.blogName)) if title else site.blogName -%}
{%- set metaDesc = description or site.description -%}
{%- set heroOg = (page.fileSlug | heroOg) if (layout == "post.njk" and not ogImage) else false -%}
{%- set ogImg = ogImage or ((site.origin + heroOg.path) if heroOg else site.defaultOgImage) -%}
{%- set ogKind = ogType or ("article" if layout == "post.njk" else "website") -%}
<!doctype html>
<html lang="{{ site.lang }}">
<head>
<!-- Google tag (gtag.js), Google Ads AW-18388216863. Loaded only when Do Not Track is
     off, so it follows the same rule as the PostHog block on this site. -->
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){ dataLayer.push(arguments); }
  if (navigator.doNotTrack !== '1') {
    var gtagScript = document.createElement('script');
    gtagScript.async = true;
    gtagScript.src = 'https://www.googletagmanager.com/gtag/js?id=AW-18388216863';
    document.head.appendChild(gtagScript);
    gtag('js', new Date());
    gtag('config', 'AW-18388216863');
  }
</script>

<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{ metaTitle }}</title>
<meta name="description" content="{{ metaDesc }}" />
<link rel="canonical" href="{{ canonical }}" />
{% if noindex or theme.preview %}<meta name="robots" content="noindex, follow" />{% endif %}
<link rel="icon" type="image/png" href="{{ site.origin }}/logo.png" />
<link rel="apple-touch-icon" href="{{ site.origin }}/logo.png" />
<meta name="theme-color" content="{{ site.themeColor }}" />

<!-- Open Graph -->
<meta property="og:site_name" content="{{ site.blogName }}" />
<meta property="og:type" content="{{ ogKind }}" />
<meta property="og:title" content="{{ ogTitle or metaTitle }}" />
<meta property="og:description" content="{{ metaDesc }}" />
<meta property="og:url" content="{{ canonical }}" />
<meta property="og:image" content="{{ ogImg }}" />
{% if heroOg %}{% if heroOg.width %}<meta property="og:image:width" content="{{ heroOg.width }}" />
<meta property="og:image:height" content="{{ heroOg.height }}" />
{% endif %}<meta property="og:image:alt" content="{{ heroOg.alt }}" />
{% endif %}<meta property="og:locale" content="{{ site.locale }}" />
{% if layout == "post.njk" %}<meta property="article:published_time" content="{{ page.date | isoDate }}" />
<meta property="article:author" content="{{ (author.name if author else site.author.name) }}" />
{% for tag in tags %}<meta property="article:tag" content="{{ tag }}" />
{% endfor %}{% endif %}

<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="{{ ogTitle or metaTitle }}" />
<meta name="twitter:description" content="{{ metaDesc }}" />
<meta name="twitter:image" content="{{ ogImg }}" />
{% if heroOg %}<meta name="twitter:image:alt" content="{{ heroOg.alt }}" />
{% endif %}
<link rel="alternate" type="application/atom+xml" title="{{ site.blogName }}" href="{{ site.baseUrl }}feed.xml" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="{{ theme.fonts }}" rel="stylesheet" />
<link rel="stylesheet" href="{{ theme.css | u }}" />
{% block head %}{% endblock %}
<script>
  // Anonymous blog analytics (PostHog) — same posture as the main site and the
  // app's TELEMETRY.md: public write-only token ('' = inert), anonymous-only
  // (person_profiles 'never'), no autocapture/recording, DNT respected.
  (function () {
    var PH_KEY = 'phc_qJzsokwcbtTGHemnvywR3nSqivNNgMjHeNVEWkZNydFB';
    if (!PH_KEY || navigator.doNotTrack === '1') return;
    var s = document.createElement('script');
    s.async = true;
    s.src = 'https://us-assets.i.posthog.com/static/array.js';
    s.onload = function () {
      if (!window.posthog) return;
      window.posthog.init(PH_KEY, {
        api_host: 'https://us.i.posthog.com',
        person_profiles: 'never',
        autocapture: false,
        before_send: function (event) {
          // PostHog fills $ip from the connection unless the event carries one.
          // Null it here and disable the GeoIP lookup so no IP, city, postal
          // code or lat/long is ever derived or stored for this page view.
          if (event && event.properties) {
            event.properties.$ip = null;
            event.properties.$geoip_disable = true;
          }
          return event;
        },
        disable_session_recording: true,
        respect_dnt: true
      });
    };
    document.head.appendChild(s);
  })();
</script>
</head>
<body class="theme-{{ theme.key }}">
<a class="skip-link" href="#main">Skip to content</a>
{% include "nav.njk" %}
<main id="main">
{% block content %}{{ content | safe }}{% endblock %}
</main>
{% include "footer.njk" %}
<script>
  // sticky-nav border on scroll
  (function () {
    var nav = document.getElementById('nav');
    if (!nav) return;
    var onScroll = function () { nav.classList.toggle('scrolled', window.scrollY > 8); };
    onScroll(); window.addEventListener('scroll', onScroll, { passive: true });
  })();
  // YouTube click-to-load: thumbnail button → youtube-nocookie iframe
  (function () {
    document.addEventListener('click', function (e) {
      var btn = e.target.closest('.yt-load');
      if (!btn) return;
      var box = btn.closest('.yt');
      var id = box && box.getAttribute('data-yt');
      // Only an 11 character YouTube video id may reach the iframe URL.
      if (!id || !/^[A-Za-z0-9_-]{11}$/.test(id)) return;
      var frame = document.createElement('iframe');
      frame.src = 'https://www.youtube-nocookie.com/embed/' + encodeURIComponent(id) + '?autoplay=1';
      frame.title = box.getAttribute('data-title') || 'YouTube video';
      frame.allow = 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share';
      frame.setAttribute('allowfullscreen', '');
      box.replaceChildren(frame);
    });
  })();
</script>
{% block scripts %}{% endblock %}
</body>
</html>