Agenoverse is a content site, so we built it like one. There are no accounts and no database to run. Sanity holds the content; Next.js turns it into fast pages.
The moving parts#
- Sanity Studio: where we write posts, guides and projects.
- Next.js: fetches content on the server and renders static pages.
- A webhook: tells the site to refresh a page when its content changes.
Fetching content#
Pages are Server Components that ask Sanity for exactly what they need, tagged so they can be refreshed individually.
const rows = await sanityFetch({ query: blogListQuery, tags: ['blog'], // refreshed when a blog post changes})Why tags matter#
Each fetch carries a cache tag. When an editor publishes a post, Sanity calls our webhook, the webhook revalidates the blog tag, and the next visitor gets fresh HTML. No rebuild, no waiting.
Note
The result: pages are served from the CDN like a static site, but editors see changes within seconds.
What we would do again#
Keep the CMS as the single source of truth, and keep the website a rendering layer. It makes the site cheap to run and easy to change.