# Change 0001: Repository-driven theme rendering - Status: Implemented - Owners: Website engine maintainers - Target: `labyricorn-theme/v1` - Last updated: 2026-07-23 ## Summary Replace the built-in production HTML and CSS renderer with a repository-controlled theme package rooted at `.theme/`. A build must resolve every input to an exact Git commit, validate the theme without executing repository code, render with a strict Liquid-compatible engine, copy only declared static assets, and publish a single immutable release artifact. Themes are trusted presentation data, not executable build programs. They may contain templates and manifest-declared browser assets, but may not run Node, shell commands, package-manager scripts, Liquid extensions, or arbitrary build-time callbacks. The first implementation is deliberately read-only. The control plane displays configuration and theme data from the resolved Git snapshot, but does not claim to persist edits until a separate reviewed commit or pull-request workflow is implemented. ## Decision record | Area | Decision | | --- | --- | | Template engine | Liquid-compatible, implemented with LiquidJS in strict mode | | Theme location | `.theme/` in the repository named by `site.yml` | | Theme execution | Templates only; no repository-provided build-time code | | Template selection | Explicit manifest keys selected by content and project configuration | | Project publication | Configuration-first; repository content cannot create a project page by itself | | Standalone files | Explicit source-to-route mappings in project configuration | | CSS and browser JavaScript | Static files explicitly declared by `theme.yml` | | Fonts | Git or checksum-pinned HTTPS sources, copied into the release | | Missing or invalid theme | Fail validation and create no release | | Configuration source | Fresh immutable snapshots at exact Git commits for every build | | Control-plane editing | Read-only in v1 | | Content safety | Escaped values plus explicitly typed, sanitized content fields | | Promotion | Staging and live point to the same immutable release directory | | Determinism | Input commits and source-file checksums are recorded in the manifest | | Production fallback | None after migration | ## Current state and problem statement The current implementation has a real deterministic artifact writer, but its presentation and provenance do not yet match what the control plane reports. | Current behavior | Evidence | Required change | | --- | --- | --- | | Production layout and CSS are string literals. | `src/backend/buildEngine.ts` defines `layout()` and embeds a `