Content import operations

1 operation, content.importMarkdown. It runs in a batch through apply_ops, dry_run_ops, the CLI or the admin.

Updated
OperationWhat it doesPermissionConfirmation
content.importMarkdownReplace the content of a richtext node with Markdown, in one language (the site's main one when locale is absent; the other languages keep theirs).content.editnone

content.importMarkdown

Replace the content of a richtext node with Markdown, in one language (the site's main one when locale is absent; the other languages keep theirs). It reads # headings at their level, paragraphs, nested lists, fenced code with its language, pipe tables (head row as header cells), > **Note:** … quotes as callouts (Note/Nota, Tip/Suggerimento, Warning/Pitfall/Attenzione/Avvertenza; other quotes stay quotes), <kbd> keys, links the rich text allows, **bold**, *em* and code. A picture ![alt](src) must be in the site's media library, named media:<id> or by its file name; one that is not is refused (upload it first). A YAML front matter block is skipped. One undoable tree commit.

permission: content.editwrites: tree:{pageId}class: transactionundo: yes

Example input

{
  "pageId": "6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f",
  "nodeId": "text0001",
  "locale": "en-US",
  "markdown": "# Build a page\n\nPress <kbd>Esc</kbd> to select the container.\n\n> **Note:** Every change saves on its own.\n\n```bash\nyarn splash context\n```\n"
}

Input

FieldTypeRequiredNotes
pageIdstringyesAt least 1 character.
nodeIdstringyes
markdownstringyesAt most 400000 characters.
localestringnoAt least 2 characters. At most 35 characters.

Output

FieldTypeRequiredNotes
revisionintegeryesAt least 0.
inversearray of object | object | object | object | object | object | object | object | object | object | object | object | objectyes
blocksintegeryesAt least 0.

Try it

yarn splash content.importMarkdown '{"pageId":"6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f","nodeId":"text0001","locale":"en-US","markdown":"# Build a page\n\nPress <kbd>Esc</kbd> to select the container.\n\n> **Note:** Every change saves on its own.\n\n```bash\nyarn splash context\n```\n"}' --dry-run

Generated from the operation registry and the MCP tool catalogue (source 58f7d65da2a58cc7).

Something wrong on this page? Write to docs@librettocms.com.

Libretto docs

Colophon. These docs are a Libretto site: 68 pages in two languages, 20 guide pages imported from Markdown and 41 reference pages generated from the operation registry. Set in Softcore, with code in IBM Plex Mono. Its outline:

/ Libretto docs /start Get started /start/request-access Request access /start/workspace Your workspace /start/first-site Your first site /start/invite-a-client Invite a client /start/connect-claude Connect Claude to Libretto /build Build /build/first-page Build a page /build/layers-and-canvas Layers and canvas /build/site-components Site components /design-system Design system /design-system/tokens Colours, space and themes /design-system/components Components and variants /design-system/fonts Typography and fonts /motion Motion /motion/scenes Scenes and recipes /motion/image-sequences Image sequences /motion/reduced-motion Reduced motion /publish Publish /publish/languages Site languages /publish/versions Publish and versions /publish/members-and-forms Members and forms /publish/domains Domains /handover Hand a site to a client /glossary Glossary /agents Agents and API /agents/mcp MCP server /agents/cli CLI /agents/batches Batches /agents/errors Errors and findings /agents/operations Operations /search Search