DatoCMS + Astro Starter Kit

The most meta content you'll read today: a Structured Text explainer

Welcome to DatoCMS's Structured Text — the field type you're reading right now. Meta, right? Unlike traditional rich text editors that store messy HTML, Structured Text uses a clean, tree-based format called DAST (DatoCMS Abstract Syntax Tree). But enough about the nerdy internals — let's talk about what you can actually do with it.


First up: inline formatting. You've got your classics like bold text for when you really mean it, and inline code for when you want to look like you know what you're doing. There's also highlighted text for that "look at me, I'm important" energy. Oh, and italics for when you're feeling fancy.

See that image gallery above? That's a block — a modular chunk of content embedded right in the flow of your text. This particular one shows multiple images, but blocks can be anything: quotes, call-to-actions, videos, custom components. Your developers define them, and you just drag and drop. It's like LEGO, but for content.

Now here's where it gets interesting. See this link right here? It's not pointing to a URL — it's linking directly to another record in your DatoCMS project. We call these record links. Why is this powerful? Because if that record's slug or title changes, you don't have to hunt down every hardcoded URL and fix it manually. The link stays valid, always pointing to the right place. No more broken links, no more "oops, we renamed that page six months ago." Your content graph stays connected and up-to-date automatically.

Let's Talk About Headings

Headings help structure your content (shocking, I know). You can configure which heading levels are allowed, so your editors can't go rogue with an <h1> when they should be using an <h3>. Structure matters, and Structured Text respects that.

function fibonacci(num: number) {
  if (num < 2) {
    return num;
  }
  return fibonacci(num - 1) + fibonacci(num - 2);
}

Speaking of structure, here's a code block. Yes, you can embed syntax-highlighted code directly in your content. The Fibonacci function above isn't just for show — it demonstrates language-specific highlighting and even line highlighting. Perfect for documentation, tutorials, or showing off.

You can also embed records inline, like this: The page that exists just to be linked .

Instead of a link, it renders the referenced content right here in the flow. Think of it as a content cameo — a guest appearance from another record. And just like record links, it's always in sync — update the original record, and every place it's embedded reflects the change.

Ear support failed

And there's another block above — this time a video, fully optimized for streaming. Blocks can be as simple or as complex as you need. The key is that they're semantic: your frontend knows exactly what each block represents and can render it beautifully.

I've been rendered on seventeen different frontend frameworks this week. Do I get frequent flyer miles? No. Do I get a 'thank you'? Also no.

This Structured Text Field, reflecting

Blockquotes aren't just for decoration — they come with built-in support for attribution. Cite your sources, credit the author, add context. It's the little things that make content feel polished and professional.

And of course, you can still add good old regular links to external URLs. These can open in new tabs, have custom attributes — all the things you'd expect. Use record links for internal content, regular links for the outside world.

  1. Portability — Your content isn't trapped in HTML soup. It's structured data that any frontend can consume.

  2. Flexibility — Mix text, blocks, links to records, and code in a single field. No more "content goes here, components go there."

  3. Control — Developers define what's allowed. Editors get guardrails, not chaos.

  4. Future-proof — Redesign your frontend without touching your content. The structure stays, the presentation evolves.

And That's Structured Text in a Nutshell

You came here expecting a demo, maybe some placeholder content, and instead you got a crash course disguised as a homepage. Hopefully it made the concept click — or at least made you mildly entertained while explaining why your content shouldn't live inside a giant HTML blob. Either way, mission accomplished.