Sanity Portable Text vs. plain text fields: a content modeling decision
Decide when to use Sanity Portable Text instead of a plain string field for rich content, with schema, query, and rendering guidance.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Decide when to use Sanity Portable Text instead of a plain string field for rich content, with schema, query, and rendering guidance.
Portable Text is structured data, not HTML. Learn how to define custom annotations in the Sanity schema and build a shared serializer library so every frontend renders internal links, embeds, and custom marks consistently — without silent data loss.
Sanity exposes content through GROQ over an edge-cached CDN endpoint and a direct API. This architecture note covers the smallest viable read path, token trust boundaries, webhook revalidation, and failure modes for a web app using Content Lake.
Stop over-fetching CMS data. Learn how to use GROQ projections and dereferencing in Sanity to send only the necessary fields to your frontend, reducing latency and payload size.
Learn how to render Sanity Portable Text safely by aligning schema, GROQ projection, and a custom serializer to preserve links, annotations, and block semantics.
Learn how Sanity’s hotspot‑enabled image pipeline lets you shift cropping and responsive design decisions from code to content. A step‑by‑step guide covers schema setup, GROQ querying, and client‑side URL building, plus trade‑offs to watch out for.
Portable Text stores rich content as JSON blocks. Render it in React using block-content-to-react and custom serializers instead of raw HTML.
Design a robust, idempotent webhook pipeline for Sanity.io using a queue, HMAC verification, and operational monitoring. Learn the minimal architecture, security checks, and failure handling steps.
Blog listings that fetch whole Sanity documents waste bandwidth and couple UI to unused fields. Use precise GROQ projections and parameterized named queries so pages fetch only what they render.