Status: Active (current manifest contract for validation and uploads)
dev, validate, pack) is external to the runtime contract.A ZeroPress theme is responsible only for:
theme.json)Out of scope:
Baseline structure compatible with current build/upload pipelines:
my-theme/
theme.json
layout.html
index.html
post.html
page.html
archive.html
category.html
tag.html
404.html (optional)
partials/
*.html
assets/
style.css
theme.js (optional)
Key points:
.html files.partials/ is optional.assets/style.css is required.assets/theme.js is optional and is not auto-executed by the runtime contract.archive.html, category.html, and tag.html are optional capabilities. If a theme omits them, related route outputs are omitted even when preview-data still contains those route arrays.404.html is optional. When present, build tooling may emit a 404.html artifact; when absent, that artifact is omitted.theme.json v0.3Minimal example:
{
"name": "My Theme",
"namespace": "your-namespace",
"slug": "my-theme",
"version": "0.3.0",
"license": "MIT",
"description": "A ZeroPress theme.",
"runtime": "0.3",
"menuSlots": {
"primary": {
"title": "Primary Menu",
"description": "Main header navigation"
},
"sidebar": {
"title": "Sidebar Menu"
}
}
}
Required fields:
name (string, 1-80 chars)namespace (string, 3-24 chars)slug (string, 3-32 chars)version (semver)license (enum)runtime (must be "0.3")Optional fields:
author (string, 1-80 chars if present)description (string, up to 280 chars)menuSlots (object map of recommended menu_id values)License enum:
MITApache-2.0BSD-3-ClauseGPL-3.0-onlyGPL-3.0-or-laterIdentity rules:
namespace and slug must follow the ZeroPress package naming rulesnamespace must match the registered publisher namespace in directory-backed submission flowsslug is the canonical theme identifier within a namespacemenuSlotsmenuSlots is an optional object that declares which menu_id values a theme commonly expects.
primary, footer, or docs-sidebarmenuSlots does not assign a menu to a slotmenuSlots does not filter or control build behaviormenus.<menu_id> present in preview-data, whether or not that id is declared hereRecommended slot ids:
primaryfooterdocs-sidebarValidation rules:
menuSlots must be an object if presenttitledescriptionMenu slots are distinct from template slots.
theme.jsonmenu_id values are separate namespaces, so values like footer may appear in both without conflictDefining menuSlots does not change template rendering rules or allowed template slot names.
layout.html must include exactly one ``.content, header, footer, meta.<script> tags are not allowed in layout.html.,).is supported as an optional rendered HTML fragment for menu trees, for example.Commonly excluded files:
.gitnode_modulesdist*.log__MACOSX, .DS_Storepackage-lock.json, pnpm-lock.yaml, yarn.lock, bun.lockbErrors:
theme.json or invalid JSONlayout.html, index.html, post.html, page.html)assets/style.cssversion semverlicenseruntime not equal to "0.3"namespace or slugmenuSlots type or empty objectlayout.html slot rule violationsWarnings:
archive.html, category.html, tag.htmlpost.html missing ``post.htmlRuntime behavior:
archive, category, and tag pages are emitted only when both renderable route data exists and the matching template exists.404.html is emitted only when the theme provides a 404.html template.npx zeropress-theme validate, pack, and dev use this runtime contract as the baseline.
v0.3 is the only accepted manifest contract for new validation and upload flows.v0.2 manifests are historical and are no longer accepted by validator-backed upload/submission paths.>= 18.18.0| Item | Classification | Notes |
|---|---|---|
theme.json, layout.html, index.html, post.html, page.html, assets/style.css |
Normative (Required) | Missing files produce validation errors |
theme.json.name, theme.json.namespace, theme.json.slug, theme.json.version, theme.json.license, theme.json.runtime |
Normative (Required) | Must be present and valid |
theme.json.author |
Informative (Optional) | Optional package display metadata |
theme.json.description |
Informative (Optional) | Recommended metadata for theme clarity |
theme.json.menuSlots |
Informative (Optional) | If present, it must satisfy the runtime schema |
layout.html must contain exactly one `` |
Normative (Required) | Validation error if violated |
Allowed template slots: content, header, footer, meta |
Normative (Required) | Unknown slots are invalid |
No <script> in layout.html |
Normative (Required) | Validation error |
Mustache block syntax forbidden (,) |
Normative (Required) | Validation error |
| Path/symlink root escape forbidden | Normative (Required) | Validation error |
archive.html, category.html, tag.html |
Informative (Recommended) | Missing files produce warnings |
partials/ directory |
Informative (Optional) | Supported but not required |
assets/theme.js |
Informative (Optional) | Optional file; not auto-executed |