Sanity CMS

Sanity is the CMS powering the Dyson Inspired blog template. It treats content as structured data with a real-time collaborative Studio, GROQ query language, and flexible schemas. Use it to manage blog posts, authors, and media without touching code — your editors will thank you.

CMS Managed Content

The following content types are fully managed through Sanity Studio — no code changes required. Editors can update these directly from the dashboard.

ContentCMS Managed
Products (title, price, images, stock)✓ Yes
Blog posts✓ Yes
FAQs✓ Yes
Banner / announcements✓ Yes
Team members✓ Yes

Setting Up Sanity

Sanity separates content management (Studio) from content delivery (your frontend). Start by creating a Sanity project, which generates a project ID and dataset. Install the Sanity client to fetch content in your Astro application. The Studio can be hosted separately or embedded in your project.

Terminal

Defining Content Schemas

Schemas define the structure of your content. Create document types for posts, pages, products, or any custom content. Sanity provides field types for text, numbers, images, references, arrays, and more. Schemas enable Studio's editor interface and validate content structure.

Terminal

Querying with GROQ

GROQ (Graph-Relational Object Queries) is Sanity's powerful query language designed for content. It lets you filter, sort, project fields, and traverse references with intuitive syntax. GROQ queries are expressive and return exactly the data you need.

Terminal

Integrating with Astro

Fetch Sanity content at build time for static pages or at request time for dynamic content. Use Astro's getStaticPaths for generating pages from CMS data. Optimize images with Sanity's image pipeline for responsive, performant delivery.

Terminal