forked from kubewarden/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
153 lines (144 loc) · 4.39 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
/** @type {import('@docusaurus/types').DocusaurusConfig} */
import dsVariableProcessor from "./js-lib/docusaurus-variables.js";
import substituteCurrentVersion from "./js-lib/current-version.js";
module.exports = {
title: "Kubewarden",
tagline: "Kubernetes Dynamic Admission at your fingertips",
url: "https://docs.kubewarden.io",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.svg",
organizationName: "kubewarden", // Usually your GitHub org/user name.
projectName: "docs", // Usually your repo name.
trailingSlash: false,
markdown: {
mermaid: true,
preprocessor: ({ filePath, fileContent }) => {
// Process variables
fileContent = dsVariableProcessor(fileContent);
fileContent = substituteCurrentVersion(fileContent, filePath);
return fileContent;
},
},
themes: ["@docusaurus/theme-mermaid"],
themeConfig: {
docs: {
sidebar: {
hideable: true,
autoCollapseCategories: true,
},
},
algolia: {
// The application ID provided by Algolia
appId: "D1IWU8P361",
// Public API key: it is safe to commit it
apiKey: "99387ef7038005749504e6845a694feb",
indexName: "kubewarden",
// Optional: see doc section below
contextualSearch: true,
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
// externalUrlRegex: 'external\\.com|domain\\.com',
// Optional: Algolia search parameters
searchParameters: {},
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: "search",
},
prism: {
// Enable extra languages when doing syntax highlighting
additionalLanguages: ["hcl", "rust", "rego", "bash"],
},
colorMode: {
// "light" | "dark"
defaultMode: "light",
// Hides the switch in the navbar
// Useful if you want to support a single color mode
disableSwitch: false,
},
navbar: {
title: "Kubewarden",
logo: {
alt: "The Kubewarden Project logo",
src: "img/icon-kubewarden.svg",
},
items: [
{
type: "docsVersionDropdown",
position: "left",
dropdownActiveClassDisabled: true,
},
{
type: "search",
position: "left",
},
{
href: "https://github.com/kubewarden/",
label: "GitHub",
position: "right",
},
{
type: "dropdown",
label: "Community",
position: "right",
items: [
{
label: "Slack",
href: "https://kubernetes.slack.com/archives/kubewarden",
},
{
label: "X/Twitter",
href: "https://twitter.com/kubewarden",
},
],
},
],
},
footer: {
style: "dark",
copyright: `Kubewarden is a <a target="_blank" href="https://cncf.io">CNCF</a> project,
originally created by <a target="_blank" href="https://rancher.com">SUSE Rancher</a>.</br>Copyright © ${new Date().getFullYear()} Kubewarden project authors. All rights reserved.`,
},
},
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
routeBasePath: "/", // Serve the docs at the site's root
/* other docs plugin options */
sidebarPath: require.resolve("./sidebars.js"),
showLastUpdateTime: true,
editUrl: "https://github.com/kubewarden/docs/edit/main/",
versions: {
current: {
label: "Next 🚧",
},
},
},
blog: false, // Optional: disable the blog plugin
// ...
theme: {
customCss: [require.resolve("./src/css/custom.css")],
},
gtag: {
trackingID: "G-PSW07XK7TM", // Google Analytics tracking ID for CNCF
anonymizeIP: true,
},
},
],
],
plugins: [
[
"@docusaurus/plugin-client-redirects",
{
fromExtensions: ["html", "htm"],
redirects: [
{
from: ["/explanations/opa-comparison"],
to: "/explanations/comparisons/opa-comparison",
},
],
},
],
],
};