🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

How to Automatically Generate a Slug Without Using Sanity Studio

1 replies
Last updated: Jul 6, 2022
Hello, I am trying to auto generate a slug without using sanity studio, I am making a post where the user mutates the data and then next page will show the submitted post, any ideas how I can implement this without generating the slug manually? Much appreciated.
Jul 2, 2022, 9:30 AM
user M
! You'll need to write some sort of function or use an existing package to create a slug. There aren't any options for autogenerating one when submitting content via the API.
Jul 6, 2022, 3:53 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?