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

推荐订阅源

宝玉的分享
宝玉的分享
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
云风的 BLOG
云风的 BLOG
V
V2EX
The GitHub Blog
The GitHub Blog
T
Threatpost
Microsoft Azure Blog
Microsoft Azure Blog
Security Latest
Security Latest
A
Arctic Wolf
Google DeepMind News
Google DeepMind News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
V
Vulnerabilities – Threatpost
P
Proofpoint News Feed
W
WeLiveSecurity
Cloudbric
Cloudbric
C
Check Point Blog
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
T
The Exploit Database - CXSecurity.com
U
Unit 42
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
PCI Perspectives
PCI Perspectives
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Spread Privacy
Spread Privacy
Hugging Face - Blog
Hugging Face - Blog
O
OpenAI News
N
News and Events Feed by Topic
The Last Watchdog
The Last Watchdog
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
MongoDB | Blog
MongoDB | Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Privacy & Cybersecurity Law Blog
T
Threat Research - Cisco Blogs
博客园 - 聂微东
V
Visual Studio Blog
美团技术团队
Security Archives - TechRepublic
Security Archives - TechRepublic
G
GRAHAM CLULEY
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
CERT Recently Published Vulnerability Notes
Know Your Adversary
Know Your Adversary
小众软件
小众软件
Engineering at Meta
Engineering at Meta
NISL@THU
NISL@THU
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
人人都是产品经理
人人都是产品经理
Cisco Talos Blog
Cisco Talos Blog
Martin Fowler
Martin Fowler
T
Troy Hunt's Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Sanity SEO done right: Open Graph, JSON-LD, fallbacks
Jono · 2026-05-20 · via DEV Community

Every Sanity project we ship starts with the same SEO baseline: a title and description on the document, an SEO tab that overrides them when needed, and Open Graph fields one layer deeper. Fallbacks all the way down, so the page always renders something sensible even when an editor forgets a field. Here's the exact pattern we use, and where to find it in Turbostart Sanity if you want to copy it.


FAQs

Why does Sanity feel so unopinionated about SEO?

Because Sanity has to model anything — a blog, an e-commerce catalogue, a screen that shows live train times. The trade-off for that range is that the platform won't pick an SEO pattern for you. You bring the opinion; Sanity gives you the schema.

What fields should every page document have as an SEO baseline?

Title and description at the top level, used as both the page heading/blurb and the default meta. A fallback SEO image. Then a separate SEO tab with seoTitle, seoDescription, seoImage, seoNoIndex, and seoHideFromLists for overrides. Open Graph fields sit a layer deeper for the cases where you want social cards to differ from search snippets.

Why have an SEO tab if the title and description already exist on the document?

Consistency. Editors get one place to write the page copy and one place to override the meta when SEO needs something different — without leaving fields blank or duplicating data. The top-level fields always act as the fallback, so nothing renders empty.

Should JSON-LD live in the CMS or be generated automatically?

Generate it. If the author, title, description, and publish date are already structured in Sanity, map them straight into JSON-LD in your Next.js page. Set and forget. Editors never touch it, and the structured data stays in lockstep with the content.

What does seoHideFromLists actually do?

It's a flag that lets editors keep a page indexable but exclude it from listing pages. Useful for landing pages tied to paid campaigns, or one-off blog posts you don't want surfacing on the blog index. Filter on it in your GROQ query and the page disappears from lists without needing noIndex.


Transcript

Hey bud, how you doing? So, first of all, I wanted to put this on YouTube so everybody else can actually see the answer to this question because I get asked this so many times on a daily basis, but I thought it might be helpful for you.

Uh, so in short, and this is a very very common thing that we get: has anybody done SEO work on Sanity before? It doesn't really go too much into what's actually built into the model, but I hear this time and time again. Um, and the reason why you have this happen so much is because Sanity is very very unopinionated. And the reason why it's very very unopinionated is because it can create models that can do anything — genuinely anything when it comes to just writing a blog, or it can be more complex as to running an entire, like, e-commerce system, or it can be as simple as creating, like, a terminal that tells you the latest train times at a train station. It's really really um scalable.

Anyway, so what I'll talk about is a little bit of this. So this is an old learn article that we wrote with Sanity, which is really helpful. It tells you about how you should opinionate your actual SEO, and it's all good and fine if you want to take the time out to go look through this, that's great. You've got a lot more time than I have, so that's fantastic.

Now, I'm going to show you something totally different. This is actually the Turbo Art, and this is the way that we do it. It's the same thing that's in the Sanity learn documentation. Um, but I know how low people's attention spans are today, so very, very quickly, I'll show you how this works. This is how we opinionate SEO and we do the exact same on every single one of our projects.

So, when we build a page for a page builder or for a blog or any other document type, it has a title. Okay? And you can do validation. You can do things like, oh, it has to be x number of characters. You can do that. That's really cool if you think it would help the client. But for the simplicity of this, we don't have, like, that little number underneath um because we're trying to be unopinionated.

Um, and description, which is going to be effectively used as your meta description on the page. This can also double up. So if, for example, it's a blog, um, the title of the blog could also be the title that sits inside of here, and the description could be the little blurb that you get just before you click into the blog on a card. That's one thing to know. So this becomes our baseline. The same with images. So you may see an image in here as well. Um, which I believe is an SEO — so ours is a SEO image override. Um, however, sometimes we actually include the image in here as well. It could be that it should be in here. Nope. Okay. Um, that might get tweaked on the Turbo Art Sanity, but essentially I like to have an image inside of here as well as part of the pages as a fallback image.

However, we have this secondary tab which is SEO. This is your SEO, your meta title. So your title tags at the top, um, and the meta description which would be in the meta description section. Um, and these will override the title and the description. And you might ask, hold up, if we've got the title and description, then what's going to happen if we override them? Then there surely there's no reason to have these in the first place. Well, the reason we have these is because they're always a fallback. So it means that you have a consistent way of editing your pages, whether that's a page with page builder blocks or a blog which has, like, the blog title, blog description. So it may not appear on all pages.

Now we've got our SEO. So our metas, what about our open graph? Well, makes perfect sense. Let's do open graph title, open graph description. And you can go a step further and also do, I think there's a separate open graph image. Uh, you can separate it out down to as granular level as here's what we want to have on Twitter, here's what we want to have on Facebook, and I think LinkedIn does it as well, just off the top of my head. Um, this is kind of like our de facto baseline. So I would highly, highly recommend doing it this way. Um, however, you can go a lot more granular. You can put JSON LD in there. You can do all sorts of things. However, a note on JSON LD, and I've said this to a lot of different people: I much, much prefer set and forget JSON LD. So if you're already putting all this data, like titles and descriptions and things like that, in there, and authors — if you're on a blog page — then if you're on a blog page, let me show you a quick example of this. Um, I'm wondering if we have authors on here. I hope we do. If we don't, I'm going to tell you how to do it. Uh, we do. Great. So if we've got all of these authors that are inside of here, why don't we just pull those authors into JSON LD by default, which is set and forget? So you don't have to think about it. You just enter the data inside of Sanity, and a like-for-like pair comes up with JSON LD. And it's not so complicated these days with AI. So you can even do this relatively quickly. Um, but yeah, this is what I'm talking about when I talk about a de facto default SEO experience. What you should use as a baseline for every single Sanity website that is going to be a website. This obviously differs if it's going to be a different function. But if you're looking to start this straight away, or in your case, I would just literally go to the Sanity exchange, go find Turbo Art Sanity. You can also find this on GitHub. Um, go view the repo and tell the developer to just go look inside of here. Um, and pay special attention to two files. One of them is query. So query shows you how we handle our GROQ queries. And GROQ is the query language from Sanity. And then the second thing you want to pay attention to inside of here, um, is — let me see if I can find it for you. Let me just press up top any second now — is the SEO. I think it's SEO fields, which you can see. You can reuse this. This is what we use on ours where it's the SEO title, SEO description. Makes perfect sense. SEO image, SEO no index, and SEO hide from lists. And the reason we have these two left is because obviously you want to have a no index. Sometimes maybe it's a pay-per-click content page that you very specifically want to, like, tunnel down um a specific person that's coming to your website. And the second one is SEO hide from lists because, for example, you have a blog post. It may be that you don't want that blog post to show up on certain lists. It may be that you have a no index and you also don't want it to show up on certain lists, or vice versa. That's the reason why we do this because if you have SEO hide from lists inside of your GROQ, you can say give me all the blogs except for the ones that are getting hidden from lists, and it's really nice and easy to work with.

Uh, there's some very basic validation here, but I hope this helps with you trying to solve this SEO problem. If it continues, just give us a shout. We're more than happy to try and help and give you pointers in the right direction. Thanks a lot. Have a great day. Take care. Bye-bye.