Handling dynamic meta titles and descriptions in Sanity

8 replies
Last updated: Feb 25, 2021

hi, what is the best way to handle dynamic meta title, description in sanity?

Feb 9, 2021, 5:57 AM

Can you expand on this? What do you mean by dynamic?

Feb 9, 2021, 6:07 AM

Like blog posts

Feb 9, 2021, 6:07 AM

Just found url-meta-input plugin. I'll try that

Feb 9, 2021, 6:08 AM

You can use that - or just structure your blog schema to include meta fields - like title and description.Then just pull those into the head of your frontend when you build your posts.

Feb 9, 2021, 6:09 AM

Right. I'll go with this approach

Feb 9, 2021, 6:10 AM

Quick screengrab from one of my sanity projects. Keep it simple 🙂

Feb 9, 2021, 6:11 AM

Yeah this could work. Thanks

Feb 9, 2021, 6:12 AM

Super helpful. Thanks both!

Feb 25, 2021, 7:03 PM

Sanity.io: Get the most out of your content

Sanity.io is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Give your team exactly what they need to edit and publish their content with the customizable Sanity Studio. Get real-time collaboration out of the box. Sanity.io comes with a hosted datastore for JSON documents, query languages like GROQ and GraphQL, CDNs, on-demand asset transformations, presentation agnostic rich text, plugins, and much more.

Don't compromise on developer experience. Join thousands of developers and trusted companies and power your content with Sanity.io. Free to get started, pay-as-you-go on all plans.