Preview Data Reference

Preview-data is the canonical theme-facing content payload used by @zeropress/build and generated by tools such as @zeropress/build-pages.

Use this reference when you directly generate preview-data.json, review admin-generated output, or build a custom importer.

Current Schema

Required Top-Level Fields

  • version
  • generator
  • generated_at
  • site
  • content

version must be "0.6".

Optional top-level maps include:

  • menus
  • widgets
  • collections
  • custom_css
  • custom_html

Core Site Fields

Common site fields include:

  • title
  • description
  • url
  • media_base_url
  • media_delivery_mode
  • favicon
  • logo
  • expose_generator
  • search
  • locale
  • datetime_display
  • date_style
  • time_style
  • timezone
  • front_page
  • post_index
  • footer
  • indexing
  • meta

site.logo is optional theme-facing site identity data. site.logo.src is normalized like other media fields: relative/root-relative values resolve against site.media_base_url when it is non-empty, and remain same-host paths when site.media_base_url is empty. Use site.logo.alt for optional logo alternative text.

site.meta is the site-level scalar extension area. Build does not type-check it against theme hints.

Content Fields

content contains:

  • authors
  • posts
  • pages
  • categories
  • tags
  • optional media

Posts and pages may include:

  • document_type
  • content
  • status
  • discoverability
  • meta
  • data

Pages may also include optional updated_at_iso for page update metadata. Build tooling can use it for page.updated_at, sitemap lastmod, native search metadata, and theme display.

Use meta for scalar flags and metadata. Use data for structured page/post values such as facts, galleries, timelines, swatches, and stack lists.

Discovery Policy

discoverability is not access control.

  • default: normal automatic discovery.
  • noindex: render the route and add HTML robots noindex.
  • delist: render the route, add noindex, and remove it from automatic discovery outputs such as sitemap, native search, and generated listing data.

Explicit menus, explicit collections, and manual links can still expose a delisted page.

Full Spec

The long-form spec remains available at Preview Data v0.6.