How to use @sanity/desk-tool - 10 common examples

To help you get started, we’ve selected a few @sanity/desk-tool examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sanity-io / sanity-template-gatsby-blog / template / studio / deskStructure.js View on Github external
.icon(MdSettings)
        .child(
          S.editor()
            .id('siteSettings')
            .schemaType('siteSettings')
            .documentId('siteSettings')
        ),
      S.listItem()
        .title('Blog posts')
        .schemaType('post')
        .child(S.documentTypeList('post').title('Blog posts')),
      S.listItem()
        .title('Authors')
        .icon(MdPerson)
        .schemaType('author')
        .child(S.documentTypeList('author').title('Authors')),
      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)
    ])
github sanity-io / startup-starter-kit / backend / deskStructure.js View on Github external
.title("Content")
    .items([
      S.listItem()
        .title("Company Info")
        .schemaType("companyInfo")
        .child(
          S.editor()
            .id('companyInfo')
            .schemaType("companyInfo")
            .documentId("company-info")
        ),
      S.listItem()
      .title('Website')
      .schemaType("page")
      .child(
        S.list()
        .title("Website")
        .id('website')
        .items([
          /* S.documentTypeListItem('navigation').title('Navigation'), */
          S.documentTypeListItem('route').title('Routes') ,
          S.documentTypeListItem('page').title('Pages'),
          sectionItems
          /* ...Object.values(components).map(({name}) => ([S.documentTypeListItem(name), S.documentTypeListItem(`shared${name}`)])) */
          /* ...Object.values(sections).reduce(makeDocumentsAndObjects, []).map(name => S.documentTypeListItem(name).title(name)) */
        ])
      ),
      S.listItem()
        .title('Assistant')
        .schemaType("agent")
        .child(
          S.list()
github sanity-io / sanity / packages / preview-gatsby-blog-studio / src / deskStructure.js View on Github external
.title('Authors')
            .child(documentId =>
              S.document()
                .documentId(documentId)
                .schemaType('author')
                .views([S.view.form(), S.view.component(Preview)])
            )
        ),
      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)
    ])
github sanity-io / sanity-template-gatsby-portfolio / template / studio / deskStructure.js View on Github external
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)
    ])
github queerjs / website / studio / deskStructure.js View on Github external
.schemaType('siteSettings')
            .documentId('siteSettings')
        ),
      S.listItem()
        .title('Attendees')
        .schemaType('attendee')
        .child(S.documentTypeList('attendee').title('Attendees')),
      S.listItem()
        .title('Speakers')
        .icon(MdPerson)
        .schemaType('speaker')
        .child(S.documentTypeList('speaker').title('Speakers')),
      // 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)
    ])
github sanity-io / sanity-template-sapper-blog / template / studio / deskStructure.js View on Github external
.title('Blog posts')
        .schemaType('post')
        .child(S.documentTypeList('post').title('Blog posts')),
      S.listItem()
        .title('Authors')
        .icon(MdPerson)
        .schemaType('author')
        .child(S.documentTypeList('author').title('Authors')),
      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)
    ])
github queerjs / website / studio / deskStructure.js View on Github external
.title('Content')
    .items([
      S.listItem()
        .title('Settings')
        .icon(MdSettings)
        .child(
          S.editor()
            .id('siteSettings')
            .schemaType('siteSettings')
            .documentId('siteSettings')
        ),
      S.listItem()
        .title('Attendees')
        .schemaType('attendee')
        .child(S.documentTypeList('attendee').title('Attendees')),
      S.listItem()
        .title('Speakers')
        .icon(MdPerson)
        .schemaType('speaker')
        .child(S.documentTypeList('speaker').title('Speakers')),
      // 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)
    ])
github sanity-io / sanity-template-gatsby-blog / template / studio / deskStructure.js View on Github external
.title('Content')
    .items([
      S.listItem()
        .title('Settings')
        .icon(MdSettings)
        .child(
          S.editor()
            .id('siteSettings')
            .schemaType('siteSettings')
            .documentId('siteSettings')
        ),
      S.listItem()
        .title('Blog posts')
        .schemaType('post')
        .child(S.documentTypeList('post').title('Blog posts')),
      S.listItem()
        .title('Authors')
        .icon(MdPerson)
        .schemaType('author')
        .child(S.documentTypeList('author').title('Authors')),
      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)
    ])
github sanity-io / sanity-template-gatsby-portfolio / template / studio / deskStructure.js View on Github external
.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)
    ])
github sanity-io / sanity-template-sapper-blog / template / studio / deskStructure.js View on Github external
.title('Content')
    .items([
      S.listItem()
        .title('Settings')
        .icon(MdSettings)
        .child(
          S.editor()
            .id('siteSettings')
            .schemaType('siteSettings')
            .documentId('siteSettings')
        ),
      S.listItem()
        .title('Blog posts')
        .schemaType('post')
        .child(S.documentTypeList('post').title('Blog posts')),
      S.listItem()
        .title('Authors')
        .icon(MdPerson)
        .schemaType('author')
        .child(S.documentTypeList('author').title('Authors')),
      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)
    ])