-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsanity.config.ts
35 lines (34 loc) · 1016 Bytes
/
sanity.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { defineConfig } from 'sanity';
import { deskTool } from 'sanity/desk';
import { visionTool } from '@sanity/vision';
import { schemaTypes } from './schemas';
import { createPageTreeDocumentList } from '@q42/sanity-plugin-page-tree';
import { pageTreeConfig } from './page-tree.config';
export default defineConfig({
name: 'default',
title: 'Sanity plugin page tree',
projectId: process.env.SANITY_STUDIO_PROJECT_ID as string,
dataset: 'production',
plugins: [
deskTool({
structure: S =>
S.list()
.title('Website')
.items([
S.listItem()
.title('Pages')
.child(
createPageTreeDocumentList(S, {
config: pageTreeConfig,
extendDocumentList: builder =>
builder.id('pages').title('Pages').apiVersion(pageTreeConfig.apiVersion),
}),
),
]),
}),
visionTool(),
],
schema: {
types: schemaTypes,
},
});