Configuration
Configuring it
press.config.ts is the one file a site owns, and the seam the whole package turns on.
export const config = defineConfig({
types: { post: "article", author: undefined, category: undefined },
fields: { title: "Headline", slug: "Permalink", body: "Story", publishedAt: "RunDate" },
routes: { post: "/writing" },
site: { name: "Client Three", url: "https://clientthree.example" },
});
That is a test, not an illustration. CI installs the packed tarball into a separate app, points it at
a content type called article with none of the blueprint's field names, no authors and no
categories, and asserts the site renders, links to /writing, and produces a feed carrying the
client's own identity.
Only title and body are required in fields. Anything you leave out is a feature the site does
without: the engine never asks the API for that data and never renders an empty slot for it. Naming a
reference type you do not have is worse than useless, because include=Author is a 400 from the API
for a post type with no such field.
| Key | Default | Tenant setting | What |
|---|---|---|---|
site |
required | Name, Tagline, Url and one per field |
Name, tagline and absolute origin. Every absolute link is built from the origin. analyticsScript and analyticsWebsiteId (AnalyticsScript, AnalyticsWebsiteId) put a Umami script in the head, from an origin in PRESS_SCRIPT_ORIGINS |
types |
post, author, category |
operator only | The content type names |
fields |
the blueprint's PascalCase names | operator only | Which field holds what |
pageFields |
the blueprint's PascalCase names | operator only | Which field on the page type holds what |
routes |
/blog, /authors, /categories |
operator only | Where you mounted each route |
pageSizes |
20, 50, 1000, 50 | PageSizes |
Index, feed, sitemap, archive. The sitemap one bounds the entries one collection contributes, and is not a page size: the sitemap pages to that number at whatever size the API allows |
cacheTag |
cms |
operator only | The tag this site purges. Two sites on one server need two tags |
backstopSeconds |
300 | operator only | How long a cached read may live with no webhook. 0 disables it |
cmsTimeoutMs |
5000 | operator only | How long any one call to the CMS may take, a share link redemption included. Past it the call has failed, and a request-time site answers from its last good copy |
locale |
en-GB |
Locale |
Passed to toLocaleDateString |
currency |
none | Currency |
The ISO code a money binding formats with. Unset, an amount renders as a plain number |
embedHosts |
seven player hosts | EmbedHosts |
The hosts an embed block may frame |
presets |
none | Presets |
Named blocks saved as arrangements of primitives. See Presets |
cmsUrl |
CMS_URL, or http://localhost:5005 |
operator only | Where the CMS is, from this server. The variable is read when the CMS is called, not when this file runs |
tenant |
CMS_TENANT |
operator only | Tenant slug, for a multi-tenant deployment. On a request-time site, pins every host to it. The variable is read when the CMS is called, not when this file runs |
sites |
off | operator only | Request-time identity and theme from the tenant's site settings. See One build, many sites |
pages |
off | operator only | Where the Pages module's pages are mounted. "" is the site root. It has to match a route file on disk, which is why it is not a tenant's to set |
reservedSlugs |
the routes and the engine's files | ReservedSlugs, added to them |
First path segments a root-mounted page may not take. Adds to the defaults |
regions |
off | HeaderPath, HeaderTone, FooterPath, FooterTone |
The header and the footer as block regions |
collections |
the blog's post, author and category |
Collections |
Content types rendered as lists and detail pages, with each index's copy, index page and default byline. See Collections |
optionStyles |
none | OptionStyles |
Tone, icon and label by type.field and option, for colorBy |
optionColors |
none | OptionColors |
The same, when a tone is all an option has. Read as optionStyles |
labels |
English | Labels |
The words the screens print for a visitor. See Sites |
store |
in process | operator only | Where the state a fleet has to agree on is kept: kept answers, the host map, the replay guard, the generation of each cache tag. Needed only when more than one container serves the site. See Running more than one container |
home |
the post index | HomePath, HomeCollection |
What createHome serves at /. See Sites |
structuredData |
on | operator only | false leaves out the JSON-LD block barakoCMS 4.8 sends with an entry. See Collections |
theme |
the barakoCMS palette | Colors, Fonts, Radii, Layout, Space, Text, Tokens, Tones, StyleRecipes |
Colours, faces, radii, column widths, a site's own named values and tones, and the looks its blocks can name. See The look |
The third column is the whole of the split. A key marked operator only is one the image decides for
every tenant it serves, and each is that for a reason you can name: types, fields, pageFields
and routes are what the blog factories compile against, cacheTag, backstopSeconds,
cmsTimeoutMs, cmsUrl, tenant, sites and store are facts about the deployment rather than
the site,
and pages has to match a route file on disk. Everything else is that tenant's data, edited in
barakoBrew, and wins over what this file said. A tenant that sets nothing renders exactly as the
file says.