On this page

Set the deployment URL and metadata before publishing. Configure feeds and host policies for the features your site uses. Then follow Deploy a site to build and publish the output.

SEO metadata

The theme writes the common tags for search and sharing:

  • canonical URL
  • page description
  • Open Graph title, description, type and URL
  • Twitter Card title and description
  • theme color for light and dark mode

Titles and descriptions come from the current page or section first. If those are missing, the theme falls back to config.title and config.description.

Set an image only when you have one:

[extra.devlab.seo]
og_image = "/images/social-preview.png"
og_image_alt = "Preview of the project"

If og_image is empty, image tags are not rendered. Page and section overrides, content types and language alternates are described in Languages and metadata.

Atom feed

DevLab uses Zola's built-in feed generator. Enable it in zola.toml:

author = "Your name"
generate_feeds = true
feed_filenames = ["atom.xml"]

When feeds are enabled, the theme adds an autodiscovery link for each configured filename. atom.xml uses the Atom MIME type and rss.xml uses the RSS MIME type. Custom filenames omit the optional type hint. Set author so generated entries do not fall back to Unknown. Most RSS readers can subscribe to Atom feeds without extra setup. There is no custom feed template in the theme.

To exclude a page from its section feed:

+++
title = "Internal release note"
include_in_feeds = false
+++

This is useful for utility pages or updates that should remain published without being delivered to subscribers.

Favicon

The theme ships a small SVG favicon:

static/favicon.svg

It is linked from the page head as an SVG icon. Add PNG or ICO variants only if your project needs them.

404 page

The theme includes templates/404.html. It uses the same header, footer and theme colors as the rest of the site.

If search is enabled, the page also points visitors back to the header search field.

Syntax highlighting

Use Zola's high-contrast pair so code blocks match the color mode and keep text readable on the theme's default code surfaces:

[markdown]

[markdown.highlighting]
light_theme = "github-light-high-contrast"
dark_theme = "github-dark-high-contrast"

The theme adds the code block frame, language label and Copy button styling. Syntax colors still come from Zola. When changing either the highlighting themes or --color-pre-bg, check comments, keywords, highlighted lines and line numbers in both color modes. A syntax palette that works on its upstream background may lose contrast on a different surface.

Cache policy

DevLab appends a content hash query (?h=...) to the URLs of its stylesheets and built-in JavaScript files, including the lazy search loader's first-party dependencies. Zola computes the hash from the effective build files, including compiled Sass and site-owned overrides. Unchanged files keep the same URL; changed contents produce a new URL on the next build. Configure any CDN or proxy to include query strings in its cache key.

HTML must revalidate so visitors receive the current asset URLs. Generated search indexes, vendored libraries and custom search script paths keep unversioned URLs and also need revalidation. For example:

Cache-Control: no-cache

This permits storage while requiring validation before reuse. Reserve long-lived immutable caching for content-hashed or versioned URLs that never change. If a host cannot expose custom headers, verify its default cache policy and invalidate its cache as part of deployment. Installing a new Git revision changes hashed URLs only when the effective asset contents change.

Content Security Policy

The built-in color initializer and lazy search loader use same-origin external JavaScript files, with configuration passed through HTML data-* attributes. The theme's scripts can use script-src 'self' without 'unsafe-inline' or inline script hashes that vary by base URL or language. A nonce- or hash-based strict CSP still needs to allow the external scripts and the search dependencies they load.

The small js/theme-init.js runs synchronously in <head>, before stylesheets, to apply the color mode and dismissed announcement state before content appears. When overriding the head partial, preserve this order and do not add async or defer to this script. It adds a blocking request on a cold cache; configure its cache policy as described above.

Account for site-owned integrations separately and test search, color initialization and diagrams under the actual host policy. Diagram SVG can contain inline styles, which need a suitable style policy. CSP headers and their build integration belong to the consuming site/host. DevLab does not inject a universal policy into content pages.