Document tabs and metadata
Give a document its own editing tabs, lock its address, and keep its search metadata.
Put document-level settings in Markdown frontmatter or the top level of a structured record. Declare the fields in your collection schema where the framework validates or strips unknown keys.
| Setting | Values and effect |
|---|---|
studio.slugs.immutable | Set true to lock the address of this entry. Defaults to false. Useful for a homepage or another page with a fixed route. |
previewUrl | Local path for this document’s preview. Has priority over the website’s preview map. Omit to use the normal route lookup. |
studio.blocks | Ordered array of editing tabs. Omit to use the standard form and body editor. Each tab points to an existing field or a specific part of the Markdown body. |
studioSeo.targetPhrases | Optional array of search phrases for this page. An empty or absent array starts without target phrases. |
studioSeo.research | Array Studio appends to when an editor applies a research proposal. Each entry records itemId, workflowId, runId, appliedAt, and sources with url, title, and retrievedAt. Preserve this generated data when editing the document. |
Fields inside each studio.blocks entry
| Key | Values and effect |
|---|---|
id | Required, unique within the document. Start with a lowercase letter, then use lowercase letters, digits, or hyphens. details and source are reserved. story is available for a Markdown tab. |
label | Required, nonempty tab title shown to the editor. |
type | Required. fields opens a top-level record field. markdown opens a named slot in the Markdown body. |
field | Required for fields. Names an existing top-level field such as credits. Optional on a Markdown tab to also expose an associated field. Studio’s own studio object is reserved. |
component | Required for markdown. Name of the one top-level MDC container that holds the text, for example gallery-story. |
slot | Required for markdown. Name of an explicit slot marker inside that container, for example intro for #intro. Include the marker even for #default. |
icon | Optional icon identifier for the tab, for example i-lucide-book-open. |
locale | Optional language code for the tab. Studio uses it to select a matching localized preview, with studio.defaultLocale for the unprefixed language. |
For example, this frontmatter and body give an editor an Introduction tab. The website’s Markdown renderer must understand the container syntax. For Astro sites using Markdoc tags, see Visual component forms.
---
studio:
blocks:
- id: introduction
label: Introduction
type: markdown
component: gallery-story
slot: intro
---
::gallery-story
#intro
The exhibition opens on Friday.
::