Manifest format

The published JSON a page fetches, field by field.

The published manifest is the only thing a visitor fetches. It is public, it is cacheable, and it is small.

GET /webnak/m/{siteKey}/manifest.json?path=/
{
  "version": 12,
  "elements": {
    "[data-webnak=\"hero-title\"]": {
      "text": "Now shipping worldwide"
    },
    "[data-webnak=\"hero-image\"]": {
      "attrs": { "src": "/hero-v2.jpg", "alt": "Our warehouse" }
    }
  }
}
FieldTypeMeaning
versionnumberIncrements on every publish for this page.
elementsobjectSelector to override. The key is the selector Webnak emitted.
elements[].textstringReplaces the element's text content.
elements[].htmlstringReplaces its inner HTML. Sanitised on both write and read. Wins over text.
elements[].attrsobjectAttributes to set, such as src, href or alt.
elements[].styleobjectInline styles to set.
elements[].mediaobjectStyles per breakpoint, applied widest first.