sanity-blog

star 0

Implement a blog using Sanity CMS with Next.js App Router, ISR, and optional preview support.

6mb-Systems By 6mb-Systems schedule Updated 1/31/2026

name: sanity-blog description: Implement a blog using Sanity CMS with Next.js App Router, ISR, and optional preview support.

Sanity Blog

Guidance for building and maintaining a Sanity-powered blog integrated with Next.js.

When to Use

  • Implementing /blog or /blog/[slug]
  • Setting up or modifying Sanity schemas
  • Fetching content from Sanity using GROQ
  • Adding revalidation or preview functionality

Instructions

  • Use Sanity as the source of truth for blog content.
  • Define a post schema with:
    • title, slug, excerpt
    • publishedAt
    • mainImage (with alt text)
    • body (portable text)
    • optional author, categories/tags
    • SEO fields (meta title, description, OG image)
  • Filter out drafts for public pages unless preview mode is active.
  • Render blog pages as static-first with revalidation.
  • Prefer time-based ISR unless precise webhook revalidation is required.
  • Never expose Sanity write tokens to the client.
  • Use read-only tokens for frontend data fetching.
  • Implement preview/visual editing only if requested.
  • Ask clarifying questions if preview, scheduling, or revalidation behavior is ambiguous.
Install via CLI
npx skills add https://github.com/6mb-Systems/sg-website --skill sanity-blog
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator