Understanding Sanity CMS and Structured Content
Sanity CMS is not a traditional page-based content management system. Instead, it is a platform for structured content. But what does "structured content" mean?
Separation of Content and Presentation
In legacy platforms, content is often saved together with its layout (e.g. rich text editors that output raw HTML with inline styling). In Sanity, content is stored in pure JSON format according to schemas you define. This allows you to fetch your content using an API and render it on any platform: a website (like Astro), a mobile app, or even an AI voice assistant.
GROQ: Querying your Data
Sanity uses a powerful query language called GROQ (Graph Relation Object Queries). It allows you to filter and shape JSON data on the fly. For instance, querying blog posts sorted by their publication date is simple and efficient.