惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
L
LangChain Blog
人人都是产品经理
人人都是产品经理
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
博客园 - 【当耐特】
量子位
有赞技术团队
有赞技术团队
Jina AI
Jina AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
C
Check Point Blog
B
Blog RSS Feed
M
MIT News - Artificial intelligence
H
Help Net Security
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 聂微东
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
A
About on SuperTechFans
腾讯CDC

Sanity.io

A Board Game agent built using Sanity Context and Vercel's AI SDK | Sanity Build a prototype with Claude Code that your whole team can edit | Sanity What’s New - May 2026 | Sanity I built a London pub guide with v0 and the Sanity MCP in six hours. Here's what I learned. | Sanity Build a conference concierge with Agent Context and Anthropic | Sanity Build a content-aware Telegram agent with Vercel AI SDK and Chat SDK | Sanity How I used Agent API to generate photos for my family’s recipes | Sanity What’s New April - 2026 | Sanity Better context, better matches: An AI love story (for dogs) | Sanity How to write for an agent | Sanity Content Agent, meet Slack: AI content operations in your workflow | Sanity Structure powers intelligence | Sanity Your agent needs better content. Here's how to give it. | Sanity How to serve content to agents (a field guide) | Sanity Sanity TypeGen GA: Automatic TypeScript types for content and GROQ | Sanity Sanity is now available on the Vercel Marketplace | Sanity The logo soup problem (and how to solve it) | Sanity Content Releases: From scattered updates to coordinated publishing | Sanity What's New - February 2026 | Sanity How we solved the agent memory problem | Sanity v0 Builder Challenge: The winners | Sanity Introducing: Sanity Agent Skills | Sanity Content Agent: Days of work in one conversation | Sanity Our Sanity Values | Sanity Open Source Pledge 2025: Stepping up when it matters | Sanity v0 builder challenge: $3000 in prizes | Sanity Why AI Breaks Without Structured Content Operations | Sanity What’s New January - 2026 | Sanity BFCM 2025: What teams built when infrastructure stopped being the problem | Sanity How AI shaped holiday shopping and what it means for content in 2026 | Sanity
Introducing the Sanity source plugin for Gridsome | Sanity
Victoria Bergquist · 2019-09-18 · via Sanity.io

With Sanity’s new source plugin for Gridsome, you can now build fast by default websites using structured content with the Vue.js based static site generator. It gives you fast and frugal builds, and watchMode gives you low latency real-time content preview while you develop, without having to save or publish. Using Sanity’s GraphQL schema definitons, the plugins prevents builds from breaking even though there's no content for certain types. With Portable Text you can provide a intuitive rich text editor while using Vue-components to render all aspects of your rich text and block content. No more v-html!

Launch the Gridsome Starter

Gridsome is a static site generator for Vue.js. It lets you create highly performing websites with prerendered markup, which is good for SEO and the overall user experience. Building with Gridsome gives you a lot of convenient easy-to-configure features such as taxonomy pages and effortless pagination.

We retrofitted Gridsome’s offical blog starter and put it on sanity.io/create. You'll be up and running in minutes with all the code in your GitHub and with Sanity Studio and the Gridsome frontend deployed on Netlify.

If you already have a Gridsome project, you install the plugin from npm ($ npm i gridsome-source-sanity), add your Sanity project’s ID with the name of the dataset where your content is, make sure that you have deployed your project’s GraphQL API ($ sanity graphql deploy) and that’s it. Your content from Sanity.io will now be available via Gridsome's templating GraphQL API.

Watch the video from our online meetup where we had Gridsome’s co-founder Tommy Vedvik on. We also did a live demo of the real-time watch mode.

How the plugin works

While most source plugins either connect to a REST or GraphQL endpoint, potentially firing a lot of requests on each build, Sanity’s source plugin for Gridsome will do primarily two things:

  1. Fetch a GraphQL SDL schema in order to map types correctly.
  2. Stream all your available documents from the export API point in one go.

In order words, building a Gridsome site of any size with Sanity takes two API requests and is therefore very fast - certainly among the fastest ways to build with an API-based CMS. We fetch the GraphQL schema to avoid the type inference that may struggle with polymorphic arrays (read: block content with many different types), and to prevent type inference to break your site if some content is suddenly missing. This is also why you need to redeploy Sanity’s GraphQL API when you change your content schemas in the studio.

If you enable watchMode and overlayDrafts in development mode, we'll actually do a third request to set up a listener. This will now subscribe to updates done within your Sanity dataset and update the internal nodes in the Gridsome API. This means that you'll get low latency level real-time updates in your frontend while you're building without having to publish content.

This is really convenient, and, let us be honest, we think it's really cool.

We would also like to show our gratitude to the Gridsome creators and founders Tommy and Hans-Jørgen Vedvik who have been excellent in taking feedback, fixing bugs, and providing what we needed to make this happen.