edit
This commit is contained in:
15
sanity/structure.ts
Normal file
15
sanity/structure.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import type {StructureResolver} from 'sanity/structure'
|
||||
|
||||
// https://www.sanity.io/docs/structure-builder-cheat-sheet
|
||||
export const structure: StructureResolver = (S) =>
|
||||
S.list()
|
||||
.title('Blog')
|
||||
.items([
|
||||
S.documentTypeListItem('post').title('Posts'),
|
||||
S.documentTypeListItem('category').title('Categories'),
|
||||
S.documentTypeListItem('author').title('Authors'),
|
||||
S.divider(),
|
||||
...S.documentTypeListItems().filter(
|
||||
(item) => item.getId() && !['post', 'category', 'author'].includes(item.getId()!),
|
||||
),
|
||||
])
|
Reference in New Issue
Block a user