πŸ‘€ Our most exciting product launch yet πŸš€ Join us May 8th for Sanity Connect

Slug: `slugifyFn` renamed

The slug type has gotten a brush-up recently, and as part of this process the option slugifyFn has been renamed to the easier-to-write, easier-to-remember option slugify.

There are no changes to it's signature, but you can now return a promise should you want to generate the slug asynchronously:

{
  title: 'Slug',
  name: 'mySlugField',
  type: 'slug',
  options: {
    source: 'title',
    slugify: value => someAsyncSlugGenerator(value)
  }
}

The old option will still work for a number of upcoming releases, but will be removed at some point in the future.

Was this article helpful?