Page editor

The schema-driven content editor — the field form, content blocks, rich text, validation, and the Save vs Publish split.

Not verified yet

The page editor is where authors actually edit content. It reads a file from your repo, renders every frontmatter field through a schema-driven form, and commits your changes back as a plain git commit. This page walks the editor top to bottom: opening a page, the field form, content blocks, rich text, validation, and how Save differs from Publish.

Opening a page

The Pages screen lists the Markdown files under the folder your site config points at (pagesDir). It renders as a grid of file and folder tiles: click a folder to drill in, click a file to open it in the editor. A search box filters across the whole site (the backend walks the local clone, so even deep trees return fast), and a breadcrumb tracks the folder you're browsing.

A small amber dot on a file tile means that file has an unpublished draft waiting — someone edited it in the editor but hasn't published the change to git yet. (See Save vs Publish for what a draft is.)

Languages

On a site in several languages, a tile shows which languages its page exists in as small chips (CS, EN). A language the site has but the page doesn't is shown muted; hover it to read "Not in English yet".

Missing in, above the grid, lists the pages of the whole site that have no version in the language you pick, so you can see what is left to translate. When every page has one, it says so. The list shows at most 1,000 pages and tells you when it stopped there.

Inside the editor, the language switcher in the page header shows the current language. It lists the page's other versions, which open in the editor when chosen, and the languages the page is not in yet. Your unpublished changes stay with the page you made them on.

All of this appears only for collections whose schema says how language versions are linked. See Language versions for the one line to add. To create a missing language version, ask Norcube AI: see Translating a page.

Creating a page

New page opens a dialog. You pick a collection (when the site has more than one), type a title, and get a URL-safe file slug derived from the title automatically. The page is created in the folder you're browsing, or in the collection's own folder when you are browsing outside it, and the editor opens on it straight away.

A new page holds every field of its collection, also the ones you have not filled yet, so a site whose build requires every field (an Astro content schema without .optional(), for one) builds it. A field you have not filled holds its schema default, or else an empty value: "" for text, links, images, files, dates, colours and selects (never the first option), false for a toggle, null for a number, [] for a list, and for a group each of its own fields the same way (null for a nullable group). Pages Norcube AI creates and translated pages get the same fields. Make your site's schema accept these empty values. Editing a page never adds or removes fields.

A new page is not published yet. It exists in the CMS only: nothing is written to your repository, so nothing reaches your site, until you press Publish. Until then:

  • the editor and the Pages list mark it Not published yet;
  • everything you type is kept as you go, and colleagues who open the page see it;
  • Publish creates the file in git, and from then on it is a page like any other;
  • Discard page removes it for good, after a confirmation. There is nothing in git to go back to.

History, "pages linking here" and the language switcher have nothing to show for a page that is not published yet. If someone adds a file at the same path in git before you publish, Publish says so and leaves your page as it is.

Which collection's schema drives an existing page is resolved by directory: the file's repo path is matched against each collection's path. A _collection key stamped into the frontmatter (the new-page dialog writes one) overrides that, and pages is the historical fallback. This is what lets Astro-style layouts (one subdirectory per collection, no _collection key) map to the right schema with no extra configuration.

The field form

The form is entirely schema-driven. Every field in the collection's schema renders as a labelled control, in declaration order, with the field's description shown underneath and a red asterisk on required fields. Each control matches the field's type:

Field typeControl in the editor
textSingle-line input, with a recommended-length hint when configured.
paragraphMulti-line textarea, with a recommended-length hint.
richtextTiptap rich-text editor (see Rich text).
numberNumeric input.
booleanA labelled checkbox showing Yes or No next to the box.
dateNative date picker.
colorNative colour swatch picker.
rangeSlider.
selectSearchable single-select dropdown.
multichoiceMulti-select control.
linkA link input with a type selector: Page (picker), URL, Email, Phone, File, Anchor.
referenceA picker over the site's pages, storing a path or a key field.
image / fileMedia picker / uploader (see Media library).
groupA card you click into to edit the nested object's own fields.
arrayA reorderable list of items (see Content blocks).

The full catalogue, with every per-type knob, lives in Field types — this table is the tour, not the reference.

A couple of behaviours worth calling out:

  • Booleans read as a toggle, not raw true/false. The checkbox sits inline with the field label and the adjacent text flips between Yes and No as you toggle it, so the field reads in plain language rather than as a code literal.
  • Nested groups drill in. A group field shows a summary card (title, optional thumbnail and badges from the schema's preview); clicking it navigates one level deeper, with a breadcrumb back to the top. Nullable groups get a "Set value" affordance and a "Delete (set null)" action.
  • Suggested values. A field with a suggest-mode computed value shows a Suggested: … Use affordance beneath it — it offers the derived value without overwriting what you typed, so you apply it only when you want to. auto-mode computed fields fill themselves in silently as their sources change. See Computed fields.

Content blocks and arrays

An array field renders as a vertical list of items. For a blocks array (a page built from stacked sections) that list is your page layout.

  • Reorder by dragging. Grab the handle on the left of any row and drag; a violet insertion line shows where it'll land.
  • Per-item actions live in the kebab menu on each row: Copy, Duplicate, Paste above / Paste below, and Delete. Copy/paste works across items (and across arrays of the same kind) through a shared clipboard. Duplicating or pasting always mints a fresh item identity, so two rows never share one.
  • Adding items. Single-shape arrays add with one button. When the array allows several block shapes, a type picker lets you choose which block to insert, both from the "Add item" button and from the inline + affordances that appear between rows.
  • Item previews. Each row shows a title, optional thumbnail, and badges resolved from the schema's preview config, so a list of blocks reads as "Hero", "Media + text", "FAQ" rather than "Item 0, Item 1".
  • Limits. When the schema sets minItems / maxItems, the editor shows the count and disables the add affordances at the cap.

Multi-shape arrays carry a discriminator key on each item that selects the block shape. The array's discriminator defaults to _type (configurable via idKey). Note that _component is also treated as a reserved discriminator key in the editor — content authored with a _component: key (common in Astro / Hugo / Eleventy setups) round-trips untouched rather than surfacing as out-of-schema. See Field types.

Rich text

richtext fields (and the page body, when the collection has one) render in a Tiptap editor with a formatting toolbar. The body uses the full toolbar; individual richtext fields can narrow it.

The wire format decides how the content is stored: markdown (the default) round-trips through Markdown, and html stores HTML. That's set per field in the schema, not in the editor.

The toolbar is schema-gated. A richtext field's options decide which marks and nodes are available — bold, italic, strikethrough, inline code, links, headings (and which levels), bullet and numbered lists, blockquote, code block, horizontal rule. Anything not enabled is dropped from the toolbar and its keyboard shortcut becomes a no-op, so a field restricted to bold + italic can't grow a heading via ⌘-shortcut. A field that enables nothing shows no toolbar at all.

Variables

Sites that declare a variables: block in their config get {{placeholder}} support in the editor: text, link and paragraph fields grow a {} insert button listing every site-wide variable with its current value (picked one lands at the cursor), and any field containing {{tokens}} shows resolved hints underneath — including an amber flag for tokens that match no variable. The full story — the variables document, the config pointer, the expansion contract your build implements — lives on Global variables.

Out-of-schema content

If a page carries a frontmatter key the schema doesn't describe, it shows up in an Out-of-schema content panel at the bottom of the form (an amber, collapsible section listing each stray key, its value type, and an editor for simple values). You get two actions per key:

  • Add to schema infers a field type from the value and appends it to the schema file that owns this level, so the key becomes a first-class field on the next render.
  • Remove drops the key from the page.

Whether this panel appears at all is governed by the collection's extraKeysPolicy: show (the default) renders it, while hide and strip suppress it. With strip, out-of-schema top-level keys are also dropped from the frontmatter when you publish. Reserved metadata keys (_type, _collection, _id, _component) are never treated as out-of-schema.

The Health panel

The Health panel (in the right-hand rail) says what stands between the page and a good publish, in two parts.

Must fix to publish runs the same schema-aware validation a static build would care about: required fields, length and range bounds, item counts, and so on. Each error shows the field label, the rule that failed, a message, and the field's path. A page with any of them can't be published.

Worth fixing never stops a publish. It lists the validator's warnings (links to pages that are gone, schema hints) and the page's own issues from Content health: the check in plain words ("Page titles too long or too short") and what it measured ("74 of 60 characters, 14 too many"). For a title or meta description the number follows your typing, measured against the range the check used, and the row turns green with Looks right now before you save. Once the change is saved it says Fixed, waiting to be published, and after a publish Fixed, the next check clears it. The other checks update when the site is checked again after a publish.

Each issue offers what it can:

  • Fix with AI (titles, meta descriptions, link text) asks Norcube AI for the same change as on the Content health page; you confirm its card. On a missing language version the button is Add English version (or the language that is missing), which asks Norcube AI to translate the page.
  • Ignore dismisses the issue for its current value, with Undo for a few seconds. Ignored issues fold away under Ignored (n), each with Restore. Both need the permission to save unpublished changes (cms:UpdateDraft).
  • See the whole site's health opens Content health.

Clicking an error or an issue focuses the field: the editor drills into the right level, flips back from Preview to Edit if you were previewing, scrolls the field into view, and ring-pulses it.

The rail's Health badge counts the errors, the warnings and the health issues left. It is red while something stops a publish and amber otherwise. Next to Save and Publish, the page's health shows as a chip ("2 issues", or a quiet "No issues"); clicking it opens the panel. The chip is not shown for site settings documents, for a page that is not published yet, or while the page has not been checked. On a narrow screen the panel opens over the page.

Content health scores the whole site, so a page shows its number of issues, never a score. See Validation and its required rule.

Save vs Publish

The editor draws a hard line between staging your work and committing it to git.

  • Save stores your unpublished changes. They are saved continuously as you type (roughly a 0.7-second pause), and the Save button forces the pending write through immediately, which is handy before you step away. No git operation happens. Unpublished changes are shared per page, not kept per person: a colleague who opens the page sees them. While a page has them the breadcrumb shows an "Unpublished changes" chip, and the file's tile on the Pages list grows its amber dot.
  • Publish commits the working copy to your branch with a subject like Norcube: edit <filename>. That's the only git write the edit flow performs. On a successful publish the unpublished changes you published are cleared.

The Save button says where your changes stand: Saving… while they are on their way, Saved once they are stored. A save that fails is tried again twice by itself. If it still fails, Not saved appears beside the button; press Save to try again.

If you close the tab while edits are not stored yet, the editor sends them and your browser asks before it leaves the page. It also asks while a publish is on its way.

At publish time the page is prepared the same way everywhere, in the editor and on the server: it honours whenHidden: 'drop' and the strip extraKeysPolicy, and it prunes contentless array items so a half-added block row can't ship and break the downstream build.

A page with errors can't be published. If it doesn't meet the site's schema (a required field is empty, a value is of the wrong kind), the editor says so above the form and the server refuses it, whatever sent the request. Fix the fields listed in the Health panel. Warnings never stop a publish.

Health issues never stop a publish either. When the page still has some, Publish asks once ("2 health issues on this page. Publish anyway?") with a link to the Health panel; Publish anyway goes ahead, and it does not ask again for that page while the editor stays open.

To publish several pages together, as one commit, use Changes.

When a page is changed elsewhere

Two people can have the same page open, Norcube AI can store an edit to a page while you have it open, and the page's file can get a new commit (a colleague published it, someone pushed to the repository). Nobody's work is overwritten without their knowing.

Someone stored newer unpublished changes.

  • Every save says which version of the unpublished changes it was based on. If newer ones were stored in the meantime, your save is refused and autosaving stops.
  • The editor then says who changed the page ("This page was changed elsewhere by Petra", or "through Norcube AI, confirmed by Petra") and offers two choices: Load the newer version, which drops your unsaved edits on this page, or Keep mine, which replaces the stored version with yours. Save and Publish wait for your choice.
  • When you come back to the window, the editor looks for newer changes. If you have nothing unsent it loads them quietly and says so.

The file got a new commit while the page is open.

  • If nothing of yours would be lost (no unsent edits, no unpublished changes on screen), the editor loads the newer version and says so: "This page was published elsewhere. It now shows the published version." or "This page was changed in the repository. It now shows the latest version."
  • Otherwise it stops saving and asks, with the same two choices. Load the newer version drops your edits on this page that are not published. Keep mine keeps your version as unpublished changes on top of the newer file; publishing it then replaces the published page with yours.
  • Publish sends the version of the file your page is built on, so a newer commit you have not seen is refused, never replaced.

While you publish. Nothing is saved while a publish is on its way. What you type after pressing Publish is kept: once the publish is done it is put back on top of the published page and saved as unpublished changes.

Publishing over someone else's changes. If you publish while someone's newer unpublished changes exist, your version is published and theirs stay stored. The editor says so ("Published. Newer unpublished changes by someone else are still stored for this page."). Their changes were made on the older file, so Changes lists them as Changed in the repository, where they can only be discarded. A person who opens the page then sees the published version, with a note that the unpublished changes were made on an older version of the page; their first save is refused rather than stored over those changes, and they choose.

Leaving a page. If you leave a page while the editor is asking you to choose, or a save made as you left is refused or fails, your edits are kept in this browser tab: a message says they were not saved, and they come back on screen, with the question, when you open the page again. They are lost if you close the tab.

A page moved or deleted elsewhere. A page moved in another tab or by a colleague is followed: the editor opens it at its new path and says "This page was moved here from …. The editor followed it, so nothing was saved at the old path." A page that is no longer at its path says so ("This page is no longer at this path"); your edits stay on screen but are not saved, since a save would put the page back there.

There is no automatic merging: one version is kept.

The kebab menu holds the rest:

ActionWhat it does
RefreshRe-reads the file and config from the repo (bypassing the cached parse).
Discard changesThrows away the unpublished changes and resets the working copy to the committed file. For a page that is not published yet the item is Discard page: the page is removed.
Delete pageCommits a removal of the file (recoverable from git history). Unpublished changes that differ from the deleted file are kept, listed in Changes, and the editor says so. Not offered for a page that is not published yet.

Publishing and deploys

Publishing is not a special Norcube deployment step. It's a normal git commit on your branch, so whatever CI or host you already use (Cloudflare Pages, Vercel, Netlify, your own pipeline) picks it up exactly like a commit pushed from a laptop. There's nothing Norcube needs to "deploy" — your build owns that.

The flow also works the other way. When a commit lands on the backing branch from outside Norcube, GitHub sends a (signature-verified) push webhook; Norcube invalidates its cached config for that repo and branch and refreshes its local clone, so the next time you open the editor you see the up-to-date content. You can also force this from the editor's Refresh action.

What's not there yet

  • No device / responsive preview toggles. There's a full-width Preview mode that swaps the editor for a live render of your own site, but no phone/tablet frame switcher. Live preview has its own page: Live preview.
  • No per-person unpublished changes and no merging. Unpublished changes are shared per page. Two people editing the same page at once are told about each other's changes, and about a new commit of the file, and choose which version to keep; see When a page is changed elsewhere.

Where to next

On this page