Configuration reference
配置参考
One file describes a site: site identity, page families and their editorial policies, voice, preview route, ask limits, admin locale and services — in the order they appear in this site's own configuration.
Reference
One file describes a site. It is the only file with editorial meaning; everything else in a client site is a thin mount over the package, a stylesheet and deploy scripts.
This page walks through its sections in the order they appear in this site's own configuration.
site
The site's name in each locale, its base URL, its list of locales and the default locale. The base URL comes from the environment, so development and production share the file.
pageFamilies
One entry per recurring editorial purpose. Each names a content type, a route and an archive route containing locale and slug placeholders, a label per locale, an editorial policy and a listing order.
The editorial policy carries the purpose in a sentence or two, the allowed block kinds, the fields required before publishing, whether the source's chronology must be preserved, and whether quotes may only be verbatim spans of the source. All of it goes into the composer's cached prompt for that family.
This site has three families:
| Family | Content type | Listing order |
|---|---|---|
| posts | article | date, with a feed |
| docs | article | sequence |
| showcase | case-study | sequence |
Several families may share one type.
voice
The organisation in one line, the tone in one or two sentences, and the language policy. Apparatus means titles and standfirsts are written in every locale while the body stays in the source language. This is the only prose a developer writes per client.
previewRoute
The route the composer's preview frame loads: the document alone, without chrome or editor, with links inert. Without it the composer falls back to the live page.
ask
The four limits on the public question box: per minute, per address per day, per day, and dollars per day. Two optional numbers set the maximum question length and the relevance threshold below which no model call is made.
adminLocale
The language of the admin interface. Labels come from a strings table, so a Chinese-facing and an English-facing client run the same code.
services
- content: Firestore, with a project id and a collection prefix; the emulator is auto-detected from the standard environment variable
- blobs: Firebase Storage or Google Cloud Storage with a bucket, or a local directory on a machine with a persistent disk
- ai: the model adapter, with an optional flag that swaps in the deterministic fake for offline work; the composer, fallback, vision and answer models each have a default and can be overridden
- auth: a single shared password, or a list of named editors with per-user attribution; a Firebase Auth adapter is planned
- embeddings: optional; when present the site gains related pages, cross-lingual search, composer references and the question box
Where the rest lives
Appearance is in the stylesheet. Infrastructure is in the environment. The client sees none of this file, and the developer rarely reopens it after launch except to add a family.