Initial commit
This commit is contained in:
commit
5a3bf52ebb
86 changed files with 2639 additions and 0 deletions
36
studio/deskStructure.js
Normal file
36
studio/deskStructure.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import S from '@sanity/desk-tool/structure-builder'
|
||||
import MdSettings from 'react-icons/lib/md/settings'
|
||||
|
||||
const hiddenDocTypes = listItem =>
|
||||
!['category', 'person', 'project', 'siteSettings'].includes(listItem.getId())
|
||||
|
||||
export default () =>
|
||||
S.list()
|
||||
.title('Content')
|
||||
.items([
|
||||
S.listItem()
|
||||
.title('Settings')
|
||||
.child(
|
||||
S.editor()
|
||||
.id('siteSettings')
|
||||
.schemaType('siteSettings')
|
||||
.documentId('siteSettings')
|
||||
)
|
||||
.icon(MdSettings),
|
||||
S.listItem()
|
||||
.title('Projects')
|
||||
.schemaType('project')
|
||||
.child(S.documentTypeList('project').title('Projects')),
|
||||
S.listItem()
|
||||
.title('People')
|
||||
.schemaType('person')
|
||||
.child(S.documentTypeList('person').title('People')),
|
||||
S.listItem()
|
||||
.title('Categories')
|
||||
.schemaType('category')
|
||||
.child(S.documentTypeList('category').title('Categories')),
|
||||
// This returns an array of all the document types
|
||||
// defined in schema.js. We filter out those that we have
|
||||
// defined the structure above
|
||||
...S.documentTypeListItems().filter(hiddenDocTypes)
|
||||
])
|
||||
Loading…
Add table
Add a link
Reference in a new issue