πŸ‘€ See Sanity in action: Watch product demo now β†’

any hints on creating a group of singletons in structure builder?

3 replies
Last updated: Jan 14, 2021
any hints on creating a group of singletons in structure builder?
Jan 14, 2021, 2:24 AM
i usually do something like this..
S.listItem()
        .title('Pages')
        .icon(Pages)
        .child(S.list().title('Pages').items(pages)),
and then make an array of all of your singleton (in this case page) types..

[S.documentListItem().schemaType('aboutPage').id('aboutPage'), ...]
Jan 14, 2021, 2:58 AM
awesome, thanks for the tip!
Jan 14, 2021, 3:04 AM
of course!
Jan 14, 2021, 3:04 AM

Sanity.io – build remarkable experiences at scale

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

Categorized in