forked from ArbitrumHub/ArbitrumDAO_Hub
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkeystatic.config.tsx
107 lines (99 loc) · 2.72 KB
/
keystatic.config.tsx
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import { collection, config, fields } from "@keystatic/core";
import { Ambassadors } from "keystatic/Ambassadors";
import { Authors, Blogs } from "keystatic/Blogs";
import {
Bounties,
Collaboration,
Events,
EventsA,
Jobs,
} from "keystatic/Community";
import {
AmbassadorContributions,
Contributions,
WGContributions,
} from "keystatic/Contribution";
import { Updates } from "keystatic/GrantHub";
import { Projects, WorkingGroups } from "keystatic/WorkingGroups";
const REPO_OWNER = "dharamveergit";
const REPO_NAME = "arbit";
export default config({
storage:
process.env.NODE_ENV === "development"
? {
kind: "local",
}
: {
kind: "github",
repo: `${REPO_OWNER}/${REPO_NAME}`,
branchPrefix: "contributions/",
},
ui: {
brand: {
name: "Arbitrum DAO Hub",
mark(props) {
return <img src="/favicon.svg" alt="Arbitrum DAO Hub" height={24} />;
},
},
navigation: {
Blogs: ["author", "posts"],
Community: [
"contributions",
"bounties",
"jobs",
"events",
"collaboration",
],
GrantHub: ["updates"],
Ambassadors: ["ambassadors", "contributionsa", "gallery", "eventsa"],
WorkingGroups: ["workingGroups", "Projects", "contributionsw"],
},
},
collections: {
author: Authors,
posts: Blogs,
ambassadors: Ambassadors,
contributionsw: WGContributions,
contributionsa: AmbassadorContributions,
contributions: Contributions,
bounties: Bounties,
jobs: Jobs,
events: Events,
eventsa: EventsA,
collaboration: Collaboration,
workingGroups: WorkingGroups,
Projects: Projects,
updates: Updates,
gallery: collection({
label: "Gallery",
slugField: "title",
path: "src/content/Gallery/*",
format: { data: "json" },
schema: {
title: fields.slug({ name: { label: "Title" } }),
image: fields.image({
label: "Image",
directory: "src/assets/images/gallery",
publicPath: "@assets/images/gallery/",
}),
externalUrl: fields.url({ label: "External Url" }),
type: fields.conditional(
fields.select({
label: "Type",
description:
"Select the type of the featured media for the contribution.",
options: [{ label: "Ambassadors", value: "ambassadors" }],
defaultValue: "ambassadors",
}),
{
ambassadors: fields.relationship({
label: "Ambassador",
description: "Select the ambassador for the contribution.",
collection: "ambassadors",
}),
},
),
},
}),
},
});