-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsanity.config.ts
More file actions
58 lines (51 loc) · 1.67 KB
/
sanity.config.ts
File metadata and controls
58 lines (51 loc) · 1.67 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { SchemaType, defineConfig } from "sanity";
import { visionTool } from "@sanity/vision";
import schemas from "./src/sanity/schemas";
import { orderableDocumentListDeskItem } from "@sanity/orderable-document-list";
import { markdownSchema } from "sanity-plugin-markdown";
import { structureTool } from "sanity/structure";
const ORDERABLE_TYPES = ["projects", "about", "photos", "archive"];
export default defineConfig({
name: "default",
title: "aydens-net-v2",
projectId: "3g4csmfm",
dataset: "production",
basePath: "/admin",
plugins: [
markdownSchema(),
structureTool({
structure: (S, context) => {
return S.list()
.title("Content")
.items([
// Minimum required configuration
...S.documentTypeListItems().filter(
(item) =>
!ORDERABLE_TYPES.includes(
(item.getSchemaType() as SchemaType)?.name,
),
),
orderableDocumentListDeskItem({ type: "photos", S, context }),
orderableDocumentListDeskItem({ type: "projects", S, context }),
orderableDocumentListDeskItem({ type: "about", S, context }),
orderableDocumentListDeskItem({ type: "archive", S, context }),
]);
},
}),
visionTool(),
],
schema: { types: schemas },
// schema: {
// types: schemas.map((schema) => {
// return {...schema, {
// orderings: [orderRankOrdering],
// fields: [
// // Minimum required configuration
// orderRankField({ type: "category" }),
// // ...all other fields
// ],
// },
// }
// }),
// },
});