Setting Up Sanity CMS for a Personal Site
6/4/2026
SanityCMSTypeScript
Sanity is a fully customizable headless CMS that offers a great editing experience and a flexible query language called GROQ.
Content Modeling
I created three content types: Post, Author, and Category. The Post type includes rich text (block content), references to authors and categories, tags, and metadata like publish date and excerpt.
Querying with GROQ
GROQ allows you to query your content with powerful filters and projections. For example, fetching all posts ordered by publish date is as simple as:
*[_type == "post"] | order(publishedAt desc){title, slug, excerpt}
This structured approach makes it easy to maintain a blog without sacrificing developer experience.