tinloof / sanity-kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to lock folder to specific document types

danteissaias opened this issue · comments

commented

Only allow blog posts to be created in /blog folder for example.

I believe this can already be achieved through a combination of initialValue for the pathname, and locking the folder, e.g.

definePathnameField({
  initialValue: { current: '/blog/' },
  options: { source: 'title', folder: { canUnlock: false } },
}),