Content model
Pages, locales, navigations, redirects, SEO and assets.
Brease stores five kinds of content for a site. Its shape is fixed except for page content, which is whatever JSON your templates read.
Pages
A page has a language-neutral part (its name and place in the page tree) and one entry per locale:
{ "name": "About", "parentId": null, "order": 1 }{
"slug": "about",
"hidden": false,
"seo": { "title": "About us", "description": "Who we are." },
"content": { "template": "page", "title": "About us", "intro": "…", "body": "<p>…</p>" }
}slughas no leading slash;""is the home page. Slug segments allow letters, numbers,-and_.hiddenpages aren't served: the delivery API answers 404 for them and leaves them out of page lists and menus.contentis free-form JSON. Brease recommends atemplatekey that picks the page's template, and acontent.schema.jsonto describe each template.- Keep the same content structure in every locale of a page.
- A page's sections are one list,
content.sections, with the same ids in the same order in every locale. See Sections.
Site-wide content (_global)
Content that is the same on every page (header and footer texts, contact details, social links, a site-wide banner or popup) goes on one page with the slug _global and the template global. Editors see it as Site-wide content.
- Slugs starting with
_are never routed, listed in sitemaps or searched.brease.route()returnsnullfor them. _globalcan't be hidden: hidden pages aren't served, and every page would lose it. It's never routed or listed anyway.- Read it with empty defaults, so the site still renders before it exists.
- Don't move collections or page sections into it. Lists built from other pages (news, team members) are read from those pages at render time.
Navigations
Each navigation has a key (main, footer, …) and a tree of items:
{
"items": [
{ "id": "n1", "label": { "en": "About", "de": "Über uns" }, "pageId": "pg_about" },
{ "id": "n2", "label": { "en": "Docs" }, "url": "https://example.com", "target": "_blank", "children": [] }
]
}An item links to a page (pageId, whose URL follows each locale) or to a url. The delivery API drops items whose page is hidden or missing.
Redirects
[{ "source": "/old-about", "destination": "/about", "status": 301 }]status is 301, 302, 307 or 308 (default 301). Sources may use parameters (/blog/:slug, /docs/:rest*). Apply them per request with matchRedirect(await brease.getRedirects(), pathname) (Next.js: in proxy.ts), so a new redirect works as soon as it's published; static sites write them to a _redirects file at build time. See Integrate a site.
SEO
Each page locale has seo, and the site has SEO settings per locale. The delivery API merges them field by field into resolvedSeo (the page wins), applies the site's title template to the page title (or to the page's name when it has no title) unless the page sets useTitleTemplate: false, and adds alternates for the other locales. Render resolvedSeo as is: don't add a title template or a home-page exception in code. Editors set the site defaults in Site settings › General.
- Page:
title,useTitleTemplate,description,canonical,robots { index, follow },openGraph { type, title, description, image },twitter { card, site, creator, title, description, image },structuredData[],customCode. - Site: the same, plus
titleTemplate(e.g.%s – Acme),siteName,defaultImage,faviconandcustomHead.
Render them with toMetadata() (Next.js), breaseHead() (Astro) or headTags() (plain HTML). In Next.js, structured data and custom code need jsonLd() and customTags() as well; see brease-client.
Assets
Images and documents are uploaded to the site's media library and referenced in content as:
{ "assetId": "ast_…", "url": "https://…", "alt": "A teacher and pupils in the science lab", "width": 2400, "height": 1600 }width and height are there for images whose size is known. The alt is in the page's locale.
Links
A link field is { label, href }. A link to another page of the site also carries that page's pageId; the delivery API sets its href to the page's URL in the requested locale, so renaming or moving a page never breaks a link. External links have only href. Links to pages inside rich text carry data-brease-page="<pageId>" and are filled in the same way.
Files are served as they are, without resizing. For responsive images, use your framework's image component (for example next/image with the asset host in images.remotePatterns).
Validation
Every change from the editor is checked before it's saved, and again before publishing. Errors: a missing parent page, a locale that isn't enabled, two pages with the same URL, a loop in the page tree, a menu item linking to a missing page or to nothing, a duplicate redirect source, a redirect loop. A redirect whose source is also a page URL, and a page with no language versions, are warnings. Only errors a change introduces block it.
The working copy
In an editor session the content is written into the sandbox as files, in .brease/ under the site root. The folder is git-ignored and managed by Brease; nobody edits it by hand.
.brease/
manifest.json { baseReleaseId, schemaVersion }
site.json { name, seo: { <locale>: … } }
pages/<pageId>/page.json { name, parentId, order }
pages/<pageId>/<locale>.json { slug, hidden, seo, content }
navigations/<key>.json { items }
redirects.json [{ source, destination, status }]A brease-seed/ folder in the repository with the same layout (or a committed .brease/) is offered for import once, in the last step of the site's setup.