Documentation
Theme Runtime Reference
The theme runtime contract defines valid theme.json manifests, template files, template syntax, and render-context expectations for ZeroPress themes.
Theme Runtime Reference
The theme runtime contract defines valid theme.json manifests, template files, template syntax, and render-context expectations for ZeroPress themes.
Use this page for quick lookup while validating a theme package or reviewing generated starter themes. To learn how to build a full theme, start with Theme Authoring.
Choose The Right Document
- Theme Authoring: practical guide for building a complete theme.
- Theme Runtime v0.6 Long-Form Spec: normative contract details for validators and build behavior.
- Theme Manifest Runtime v0.6 Schema: machine-readable schema for
theme.json.
Current Schema
Required Theme Files
theme/
theme.json
layout.html
index.html
post.html
page.html
assets/
style.css
Optional route templates include:
archive.htmlcategory.htmltag.html404.html
Optional folders include:
partials/assets/theme.js
Manifest Basics
theme.json must use runtime: "0.6".
Common fields:
namenamespaceslugversionlicenseruntimefeaturesmenu_slotswidget_areassite_metacollection_slotslinks
The root manifest object is closed. Unknown root fields are invalid.
features is optional. Omitted feature flags use ZeroPress runtime defaults: comments: false, post_index: true, search: false, and newsletter remains capability metadata without core build behavior.
Template Syntax
Templates support:
- variable paths
if,else_if, andelseif_eq,if_neq,if_in, andif_starts_withfor- loop metadata
- partials and partial arguments
- template comments
General JavaScript expressions, arithmetic, slicing, and, or, and comparison operators such as > are not part of the runtime syntax.
Comparison helpers use strict comparison and do not coerce types.
Render Context
Every route receives common data such as:
siteroutemenuswidgetscollectionstaxonomies
Post routes receive post; page routes receive page; listing routes receive structured listing data such as posts.items[], pagination, taxonomy, or archive groups.
Full Spec
The long-form spec remains available at Theme Runtime v0.6.