Skip to content

web/site — the site renderer

The site renderer's home: not built yet, it holds the recorded Jekyll builds (PLAN P1) the renderer will be measured against.

Not built yet; today this directory holds the recordings it will be measured against. This is where the React site renderer will live (ADR 0006 decision 4, PLAN P6): a TypeScript build that reads a site's generated file tree (its config, data, collections, posts and pages — decision 13), evaluates the Liquid in its content with liquidjs, renders its Markdown with kramdown-compatible unified plugins, lays the pages out in the platform's own design system (tokens and components seeded from the zer0 UI tokens, not ported from the theme), and writes the static site — pages, feeds, sitemap, robots, a Pagefind search index and redirects — with no live database. zer0-pages's Obsidian features (wikilinks, embeds, callouts, Dataview, the graph index, backlinks) become renderer plugins; their behaviour is pinned by the Python port the Jekyll-theme option uses (tools/obsidian/ and its tests), which the TypeScript plugins can be held to. A site that keeps the zer0 Jekyll look takes the Jekyll-theme option instead (P2, tools/jekyll_theme.py), which does not use this code.

A site keeps its URLs, content, feeds and redirects whichever way it renders, so it moves to this renderer one at a time (P7-<site>, sites chosen by the owner, P-D5) and only when its build here reproduces the recording of its Jekyll build in fixtures/. Those recordings were made in P1, while every site still built with Jekyll, by tools/site_manifest.py; its build writes the same kind of manifest of the renderer's output, and P6's npm run site -- --site <name> --compare compares the two with tools/site_manifest.py compare --pages. What the renderer must reproduce, and what it need not:

  • Every HTML page at the same path, with the same <title>.
  • The same text on every page — the page's own content, not the layout around it. The recordings hold, per page, the words of the element the page marks as its entry's content (e-content, itemprop="articleBody": the theme's posts and notes), else of the theme's content column, else of <main> (fixtures/README.md says exactly what counts). The theme's title banner, author, dates, reading time, share and edit menus, table of contents and sidebars are not in them. So the renderer writes each page's content inside <main> — or inside an element marked e-content, as an h-entry's content — and puts its own title, dates, menus, table of contents and sidebars in header, nav, aside and footer elements or outside <main>. The words must match, not the markup: other elements, attributes and whitespace give the same text. Where the text differs, compare prints the blocks that were lost and gained.
  • The same feed entries, in order, with the same dates (as instants, so the spelling may differ), the same sitemap URLs and the same redirects.
  • Not the other files. A Jekyll build also writes the theme's styles, scripts, fonts and images — 337 of zer0-pages-remote's 341 paths are the theme's — which a renderer in another design system does not reproduce; --pages leaves every path that is not an HTML page out of the comparison. A content image a page links to is therefore not checked here: that is the link checker's job (Monitor, G12).
Path What it is
fixtures/<site>/manifest.json What the site's Jekyll build wrote, recorded in P1 — the parity baseline, never edited by hand
fixtures/README.md What a recording holds, how each site was built, how to rebuild and compare one, and each site's status

The renderer's own code (package.json, sources, tests) arrives with P6, inside the web/ workspace the studio starts (P4).