generated from acdh-oeaw/template-app-next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeystatic.config.tsx
121 lines (109 loc) · 3.62 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import { withI18nPrefix } from "@acdh-oeaw/keystatic-lib";
import { config } from "@keystatic/core";
import { Logo } from "@/components/logo";
import { env } from "@/config/env.config";
import { locales } from "@/config/i18n.config";
import {
createConsortium,
createDocumentation,
createEvents,
createNews,
createPages,
createProjects,
} from "@/lib/keystatic/collections";
import {
createEventsOverview,
createIndexPage,
createMetadata,
createNavigation,
createNewsOverview,
createProjectsOverview,
} from "@/lib/keystatic/singletons";
export default config({
collections: {
[withI18nPrefix("consortium", "de")]: createConsortium("de"),
[withI18nPrefix("consortium", "en")]: createConsortium("en"),
[withI18nPrefix("events", "de")]: createEvents("de"),
[withI18nPrefix("events", "en")]: createEvents("en"),
[withI18nPrefix("news", "de")]: createNews("de"),
[withI18nPrefix("news", "en")]: createNews("en"),
[withI18nPrefix("projects", "de")]: createProjects("de"),
[withI18nPrefix("projects", "en")]: createProjects("en"),
[withI18nPrefix("pages", "de")]: createPages("de"),
[withI18nPrefix("pages", "en")]: createPages("en"),
[withI18nPrefix("documentation", "de")]: createDocumentation("de"),
[withI18nPrefix("documentation", "en")]: createDocumentation("en"),
},
singletons: {
[withI18nPrefix("index-page", "de")]: createIndexPage("de"),
[withI18nPrefix("index-page", "en")]: createIndexPage("en"),
[withI18nPrefix("metadata", "de")]: createMetadata("de"),
[withI18nPrefix("metadata", "en")]: createMetadata("en"),
[withI18nPrefix("navigation", "de")]: createNavigation("de"),
[withI18nPrefix("navigation", "en")]: createNavigation("en"),
[withI18nPrefix("events-overview", "de")]: createEventsOverview("de"),
[withI18nPrefix("events-overview", "en")]: createEventsOverview("en"),
[withI18nPrefix("news-overview", "de")]: createNewsOverview("de"),
[withI18nPrefix("news-overview", "en")]: createNewsOverview("en"),
[withI18nPrefix("projects-overview", "de")]: createProjectsOverview("de"),
[withI18nPrefix("projects-overview", "en")]: createProjectsOverview("en"),
},
storage:
env.NEXT_PUBLIC_KEYSTATIC_MODE === "github" &&
env.NEXT_PUBLIC_KEYSTATIC_GITHUB_REPO_OWNER &&
env.NEXT_PUBLIC_KEYSTATIC_GITHUB_REPO_NAME
? {
kind: "github",
repo: {
owner: env.NEXT_PUBLIC_KEYSTATIC_GITHUB_REPO_OWNER,
name: env.NEXT_PUBLIC_KEYSTATIC_GITHUB_REPO_NAME,
},
branchPrefix: "content/",
}
: {
kind: "local",
},
ui: {
brand: {
mark() {
return <Logo />;
},
name: "ACDH-CH",
},
navigation: {
HomePage: locales.map((locale) => {
return withI18nPrefix("index-page", locale);
}),
Events: locales.map((locale) => {
return withI18nPrefix("events", locale);
}),
"Events Overview": locales.map((locale) => {
return withI18nPrefix("events-overview", locale);
}),
News: locales.map((locale) => {
return withI18nPrefix("news", locale);
}),
"News Overview": locales.map((locale) => {
return withI18nPrefix("news-overview", locale);
}),
Projects: locales.map((locale) => {
return withI18nPrefix("projects", locale);
}),
"Projects Overview": locales.map((locale) => {
return withI18nPrefix("projects-overview", locale);
}),
Pages: locales.map((locale) => {
return withI18nPrefix("pages", locale);
}),
Consortium: locales.map((locale) => {
return withI18nPrefix("consortium", locale);
}),
Navigation: locales.map((locale) => {
return withI18nPrefix("navigation", locale);
}),
Metadata: locales.map((locale) => {
return withI18nPrefix("metadata", locale);
}),
},
},
});