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.

SettingValues and effect
studio.slugs.immutableSet true to lock the address of this entry. Defaults to false. Useful for a homepage or another page with a fixed route.
previewUrlLocal path for this document’s preview. Has priority over the website’s preview map. Omit to use the normal route lookup.
studio.blocksOrdered 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.targetPhrasesOptional array of search phrases for this page. An empty or absent array starts without target phrases.
studioSeo.researchArray 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

KeyValues and effect
idRequired, 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.
labelRequired, nonempty tab title shown to the editor.
typeRequired. fields opens a top-level record field. markdown opens a named slot in the Markdown body.
fieldRequired 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.
componentRequired for markdown. Name of the one top-level MDC container that holds the text, for example gallery-story.
slotRequired for markdown. Name of an explicit slot marker inside that container, for example intro for #intro. Include the marker even for #default.
iconOptional icon identifier for the tab, for example i-lucide-book-open.
localeOptional 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.
::