Dev Tools
PortableText
Renders Sanity Portable Text content (blocks, images, inline marks) as semantic HTML. Used on all CMS-driven pages.
Import
import PortableText from '../../components/utility/PortableText.astro'; Props
| Prop | Type | Required | Description |
|---|---|---|---|
content | any[] | Yes | Sanity Portable Text array (from GROQ body field) |
class | string | No | Additional CSS class for the wrapper div |
Supported blocks
- Paragraphs, h2, h3, h4 headings
- Inline marks: strong, em,
code - Images with optional captions (rendered via Sanity CDN at 800px WebP)