forked from common-fate/docs-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.js
235 lines (224 loc) · 6.66 KB
/
docusaurus.config.js
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const SLACK_URL =
"https://join.slack.com/t/commonfatecommunity/shared_invite/zt-q4m96ypu-_gYlRWD3k5rIsaSsqP7QMg";
const previousRoutes = [
"/granted-approvals/configuration/access-rules",
"/granted-approvals/configuration/backup",
"/granted-approvals/configuration/custom-domain",
"/granted-approvals/configuration/deployment-yaml",
"/granted-approvals/configuration/events",
"/granted-approvals/configuration/logs",
"/granted-approvals/configuration/slack",
"/granted-approvals/configuration/updating",
"/granted-approvals/configuration/users-and-groups",
"/granted-approvals/configuration/waf",
"/granted-approvals/deploying-common-fate/deploying-common-fate",
"/granted-approvals/deploying-common-fate/prerequisites",
"/granted-approvals/deploying-common-fate/setup",
"/granted-approvals/deploying-common-fate/deploying",
"/granted-approvals/deploying-common-fate/next-steps",
"/granted-approvals/end-users/end-users",
"/granted-approvals/providers/access-providers",
"/granted-approvals/providers/add-first-provider/requesting-access",
"/granted-approvals/providers/add-first-provider/clean-up",
"/granted-approvals/providers/interactive-setup",
"/granted-approvals/providers/registry/provider-registry",
"/granted-approvals/providers/registry/commonfate/aws-sso/v2/setup",
"/granted-approvals/providers/registry/commonfate/azure-ad/v1/setup",
"/granted-approvals/providers/registry/commonfate/ecs-exec-sso/v1-alpha1/setup",
"/granted-approvals/providers/registry/commonfate/okta/v1/setup",
"/granted-approvals/security-architecture",
"/granted-approvals/sso/sso-setup",
"/granted-approvals/sso/aws-sso",
"/granted-approvals/sso/azure",
"/granted-approvals/sso/google",
"/granted-approvals/sso/okta",
"/granted-approvals/sso/onelogin",
"/granted-approvals/sso/updating-configuration",
"/granted-approvals/troubleshooting/aws-credentials",
];
const newRoutes = previousRoutes.map((a) =>
a.replace("/granted-approvals/", "/common-fate/")
);
const rebrandRedirects = previousRoutes.map((r, i) => ({
from: r,
to: newRoutes[i],
}));
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Common Fate Documentation",
staticDirectories: ["static"],
tagline: "Identity-first cloud security for innovative teams",
url: "https://docs.commonfate.io",
baseUrl: "/",
onBrokenLinks: "warn", // TODO: change to throw when launching
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
organizationName: "common-fate", // Usually your GitHub org/user name.
projectName: "docs", // Usually your repo name.
stylesheets: [
"https://fonts.googleapis.com/css2?family=Bitter:wght@500&family=Rubik:wght@300;400;500",
],
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: false,
blog: false,
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
}),
],
],
plugins: [
[
"@docusaurus/plugin-content-docs",
{
path: "docs/granted",
routeBasePath: "granted",
sidebarPath: "./sidebars.granted.js",
},
],
[
"@docusaurus/plugin-content-docs",
{
id: "common-fate",
path: "docs/common-fate",
routeBasePath: "common-fate",
sidebarPath: "./sidebars.approvals.js",
},
],
[
"@docusaurus/plugin-client-redirects",
{
fromExtensions: ["html", "htm"], // /myPage.html -> /myPage
redirects: [
{
from: "/granted",
to: "/granted/introduction",
},
{
from: "/common-fate",
to: "/common-fate/introduction",
},
{
from: "/common-fate",
to: "/common-fate/introduction",
},
...rebrandRedirects,
],
},
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: "Docs",
logo: {
alt: "Common Fate",
src: "img/logo.svg",
href: "/granted/introduction",
},
style: "dark",
items: [
{
type: "doc",
docId: "introduction",
position: "left",
label: "Granted",
},
{
docsPluginId: "common-fate",
type: "doc",
docId: "introduction",
position: "left",
label: "Common Fate",
},
{
href: "https://commonfate.io/early-access",
label: "Common Fate Cloud",
position: "left",
},
{
href: "https://commonfate.io/blog",
label: "Blog",
position: "right",
},
{
href: "https://github.com/common-fate",
label: "GitHub",
position: "right",
},
],
},
colorMode: {
defaultMode: "light",
disableSwitch: true,
respectPrefersColorScheme: false,
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "Granted",
to: "/granted/introduction",
},
{
label: "Common Fate",
to: "/common-fate/introduction",
},
],
},
{
title: "Community",
items: [
{
label: "Slack",
href: SLACK_URL,
},
{
label: "Twitter",
href: "https://twitter.com/CommonFateTech",
},
],
},
{
title: "More",
items: [
{
label: "Blog",
href: "https://commonfate.io/blog",
},
{
label: "GitHub",
href: "https://github.com/common-fate",
},
{
label: "Telemetry",
to: "/telemetry",
},
{
label: "Privacy Policy",
to: "/privacy-policy",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Common Fate.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;