Documentation
/
Reference
/
Reference
Search ⌘K EN FR
Mark as read
Chapter 22 Reference
Reference
Variables, commands, options, tokens, attributes, error codes, glossary. What you come to look up without wanting to re-read a chapter.
4 min read · 11 sections · Chapter 22 / 22 Copy link
Environment variables #
All documented in .env.example, the only versioned environment file. Locally:
.dev.vars. In production: the host configuration, as runtime secrets.
Never the repository.
Variable Required Role
EDITOR_KEY_HASHyes argon2id hash of the site key. Without it, no editing is possible — that is the default state.
SESSION_SECRETyes Session cookie signature. 32 characters minimum. Replacing it closes every session.
EDITOR_NAMErecommended Author name for publications. Default: “Éditeur du site”.
EDITOR_EMAILrecommended Author address for publications.
GIT_PROVIDERyes github or gitlab (not implemented). Default: github.
GIT_REPOyes owner/repo on GitHub; group/project or numeric id on GitLab.
GIT_BRANCHyes Publishing branch. Default: main.
GIT_TOKENyes Write token of the machine account. Scoped to that repository only.
GIT_API_BASEno Alternative API root: self-hosted instance, or the fake local service (http://127.0.0.1:8787).
RATE_LIMITin production A key-value binding, not a text variable. Without it, counting falls back to memory.
Commands #
Command Where Role
npm create inline@latest <folder>anywhere Creates a site. Options: --nom, --courriel, --langue.
npm run devsite, repo Astro server alone — layout, without editing .
npm run buildsite, repo Production build. Fails if content is invalid.
npm run serve:functionssite, repo Site + functions on http://127.0.0.1:8788. This is where you edit.
npm run mock:gitsite, repo Fake local Git repository on :8787. Port: MOCK_PORT.
npm run checksite, repo Raw HTML, language parity, logs, secrets.
npm testrepo The whole suite, build included.
npm run create:siterepo A site's credentials. Options: --nom, --depot, --branche, --auteur, --courriel, --ecrire.
npm run make:keysite, repo A key and its hash — rotation. Shipped with the site since create-inline 1.1.0.
npm run bootstraprepo Bootstrapping. Options: --html, --page, --langue, --essai, --sortie.
npm run test:scaffoldrepo Site created from scratch, installed, built, checked.
npm run test:packrepo Same, from publication archives.
npm run pack:core / pack:clirepo Builds the archives.
npm run release:core / release:clirepo Publishes to the registry.
Integration options #
js
js
Copy
inline({
locales: ['fr' , 'en' ], // required — reference language first
support: { email: 'contact@agency.com' }, // shown to the client on /admin and /aide
theme: 'src/styles/theme.css' , // default
pages: { admin: true , help: true }, // false to provide your own
})
Style tokens #
Key Values Class produced Variable expected
sizexs sm base lg xl 2xl 3xl.cms-size-*--size-*
weightthin light regular medium semibold bold.cms-weight-*--weight-*
italictrue false.cms-italic—
alignleft center right.cms-align-*—
colorprimary secondary muted accent inverse.cms-color-*--color-*
Field types #
text
text
Copy
text { type, value, style } headings, labels, plain paragraphs
richtext { type, value } emphasis, links, lists — 7 tags
image { type, kind:'image', src, alt, width, height } file from src/media
video { type, kind:'video', provider, videoId, title } YouTube or Vimeo, never a file
Attributes placed in the HTML #
Attribute Value
data-cmsField path, e.g. blocks.hero.title
data-cms-typetext · richtext · media
data-cms-kindimage · video
data-cms-untranslatedtrue if the field comes from the reference language
data-cms-listcollections.{name}
data-cms-itemThe item id
data-cms-templateName of the list it is the model for
data-cms-blankJSON of a blank item
data-cms-fileThe page's content file (on body)
data-cms-locale · data-cms-pageCurrent language and page (on body)
data-cms-localesSite languages: code, address, label (on body)
Naming rules #
Object Shape Example
Page file lowercase, digits, hyphens our-services.json
Write path src/content/pages/{language}/{page}.jsonsrc/content/pages/en/home.json
Media file [a-z0-9]+(-[a-z0-9]+)*.(jpg|png|webp)bakehouse-at-dawn.webp
Item id one letter, a hyphen, 3+ digits t-001
Language code two lowercase letters en
Commit message one line, 120 characters content(en): home — hero.title
Error codes #
Internal code HTTP Meaning
bad_request400 Invalid body or path.
unauthorized401 / 502 Missing session (401) or repository refusing access (502).
method_not_allowed405 Method not expected on this route.
not_found404 / 502 File or repository not found.
conflict409 Stale version: someone published in the meantime.
too_large413 Size cap exceeded.
unsupported_format415 Unrecognised image format or out-of-range dimensions.
invalid_content422 Schema, media, ids or markup refused.
— 429 Rate exceeded. retry-after header.
unavailable502 The repository did not answer.
Ports #
4321npm run devAstro alone
8788npm run serve:functionsSite + functions
8787npm run mock:gitFake Git repository
Glossary #
Term What it is What the client reads
Overlay The editing interface layered over the page. —
Site key The shared secret, hashed with argon2id. “your key”
Edit marker Secret-free cookie that triggers loading the overlay. —
Optimistic lock Version comparison before writing. “someone published in the meantime”
Version Opaque fingerprint of a file's state (blob SHA on GitHub). —
Publication A commit, then a site rebuild. “Publish”
Draft Changes saved in the browser. “unpublished changes”
Style token A schema enum value. a button in the bar
Bootstrapping Extracting content from an annotated HTML page. —
Where to read the code #
Question File
What shape is the content? inline-core/src/schema.ts
Which style variants exist? inline-core/src/style-tokens.ts
Who is allowed to write? inline-core/src/server/auth.ts
Which caps, paths, budgets? inline-core/src/server/guard.ts
How do we talk to the repository? inline-core/src/server/git-provider.ts, github.ts
What does publishing do, in order? inline-core/src/server/routes/save.ts
How does the overlay link DOM and JSON? inline-core/src/editor/index.ts
What is placed in the page? inline-core/astro/index.ts
How is a video address read? inline-core/src/video.ts
How does the translation fallback work? inline-core/src/translate.ts