Language

What a theme is and is not

A theme is a server-side rendering presentation extension: it does not resolve languages, decide visibility or inject scripts; list pages are provided by the theme, and after changing styles you must publish once.

A theme is the system's official extension surface: it decides the typography and styles visitors see. But "theme" here has a clear boundary, and out-of-bounds ways of writing will not be allowed — understanding this boundary matters more than remembering how many template files there are.

What a theme is

A theme is a server-side rendering presentation extension: templates + style assets + a manifest, packaged, uploaded, activated, published. It runs within the kernel's routing, HTML sanitization, caching and content contracts.

It consumes the single copy of data the server has already computed: the current language, the parsed address, the visibility conclusion, which image tier to use, the writing direction. Templates only write values into attributes; they do not judge.

What a theme is never

Does not resolve languages. Which language a visitor sees is decided by the address, settled server-side; the template receives single-language data. Once a template judges language itself, the publish gate, completeness statistics, snapshot reads and rendering each judge a different way, and the cache hardens the wrong-language content into a permanent error keyed by address.

Does not decide visibility. Whether a piece of content should appear is a question the owning module answers. Writing "hide if not published" in a template is doing the same judgment a second time.

Does not inject scripts, does not copy SQL. When cross-module data is needed, go through the versioned service capability interface; if it cannot be fetched, the whole block does not appear, rather than querying tables yourself.

Does not hard-code the site root path. The root address's semantics are "the current primary language's home page"; an English page's logo click, if the root path is hard-coded, would drop back to the primary-language home page. Use the site address the server gives.

Public list pages are provided by the theme

The total routing of all public pages of the site lives in the theme module: language prefixes, address convergence, canonical and hreflang, list-page rendering. List pages need the theme to provide a list template — a content type declares its own list route, but what draws it is the theme.

So the first explanation for "a type of content is published but has no list entry" is: the current theme has no list template for this type, not that the content is lost.

Styles come from the theme's own files

Visitor pages' styles come from that theme version's own CSS assets, read in the same pass as templates. Three states must be judged separately: if this version really declares no style files, nothing is injected; only when it cannot be read (directory missing or digest mismatch) does it fall back to the built-in preset; the built-in theme's disk content is identical to the embedded copy, so public pages have zero regression.

After changing the CSS you must click "publish" once before visitors get it. This must be said plainly: saving only registers a new version, and the published snapshot still pins the old theme version.

One data contract, four places to keep in sync

The fields a theme can read are one data contract; the interface documentation, the struct in the docs and the built-in theme's templates share the same single source of truth. Adding a field to the interface while missing other places shows up as theme authors copying templates from the docs silently not handling one field.

Derived image addresses work the same way: which tier results are swapped is answered in one place by the media module — "is there a smaller tier"; the theme does not filter for itself which addresses may have derived tiers — that criterion lives in the module that sees both the main table and the derived table, and the consequence of copying it is that when another address kind is recognized later, the theme filters it out first, the feature does not work and the tests on both sides stay green.

How many themes there are now

One built-in default theme. Two others existed historically and are retired; retirement is enforced server-side (filtered in the list, refused when directly specified), and the leftover rows in the store have varying shapes.

New themes start from upload: upload the archive → validate and register a new version → activate (optionally publishing at the same time). The default and built-in themes must not be overwritten in place.