Repository navigation
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
232 lines (224 loc) · 7.46 KB
/
Copy pathdocusaurus.config.js
File metadata and controls
232 lines (224 loc) · 7.46 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
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
// @ts-check
const lightCodeTheme = require('prism-react-renderer').themes.github;
const darkCodeTheme = require('prism-react-renderer').themes.dracula;
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'CNMSQL - CloudNative for MySQL',
tagline: 'A Kubernetes operator for Percona Server for MySQL',
favicon: 'img/cnmsql.png',
url: 'https://cnmsql.co',
baseUrl: '/',
organizationName: 'cnmsql',
projectName: 'docs',
onBrokenLinks: 'throw',
markdown: {
hooks: {
onBrokenMarkdownLinks: 'throw',
},
mermaid: true,
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
// Authored content is pulled from cnmsql/cnmsql (docs/src) into ./current.
// Released versions live under ./versioned_docs (cut on operator release).
path: 'current',
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
// Show every released version plus the unreleased "next" docs.
includeCurrentVersion: true,
versions: {
current: {
label: 'next 🚧',
path: 'next',
},
},
},
// Authored here, not synced from the operator repo; the release
// workflow never touches ./blog.
blog: {
path: 'blog',
routeBasePath: 'blog',
blogTitle: 'CNMSQL Blog',
blogDescription:
'Releases, design notes and guides on running MySQL and MariaDB on Kubernetes with the CNMSQL operator.',
// No "All posts" sidebar: it leaves more width for wide tables, and
// /blog/archive lists every post.
blogSidebarCount: 0,
postsPerPage: 10,
showReadingTime: true,
authorsMapPath: 'authors.yml',
tags: 'tags.yml',
onInlineAuthors: 'throw',
onInlineTags: 'throw',
onUntruncatedBlogPosts: 'throw',
feedOptions: {
type: ['rss', 'atom'],
title: 'CNMSQL Blog',
description:
'Releases, design notes and guides on running MySQL and MariaDB on Kubernetes with the CNMSQL operator.',
copyright: `Copyright © ${new Date().getFullYear()} The CNMSQL - CloudNative for MySQL Authors. Licensed under CC BY 4.0.`,
xslt: true,
},
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themes: ['@docusaurus/theme-mermaid', '@docsearch/docusaurus-adapter'],
// Emits static/versiondiff/<docId>.json for the in-page version diff panel.
plugins: [
require.resolve('./plugins/version-diff'),
// Umami analytics (self-hosted). The plugin only injects the scripts in
// production builds, so `npm start` traffic is never recorded.
[
'@dipakparmar/docusaurus-plugin-umami',
/** @type {import('@dipakparmar/docusaurus-plugin-umami').Options} */
({
websiteID: 'dd328355-4a41-432e-9b36-c7ed68eb91a0',
analyticsDomain: 'umami.yewolf.fr',
dataDomains: 'cnmsql.co',
enableRecorder: true,
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Open Graph / Twitter cards do not render SVG, so the card is a PNG.
image: 'img/social-card.png',
// Algolia DocSearch via @docsearch/docusaurus-adapter (Algolia-maintained).
// The appId and (search-only) apiKey are public and safe to commit.
// contextualSearch scopes results to the version the reader is viewing;
// the adapter skips its facetFilters injection when askAi.agentStudio is
// true, so Ask AI (Agent Studio backend) receives a valid request.
// Uses the `docsearch` key (not `algolia`) so preset-classic's built-in
// theme-search-algolia stays disabled and only the adapter handles search.
docsearch: {
appId: '80Y8ZEWQBI',
apiKey: '88e1e9768914cb753242ecd420c9fd49',
indexName: 'CNMSQL - Docs',
contextualSearch: true,
askAi: {
assistantId: "0e916aac-64c5-4aeb-a556-98d814928e2b",
agentStudio: true,
},
},
navbar: {
title: 'CNMSQL - CloudNative for MySQL',
logo: {
alt: 'CNMSQL - CloudNative for MySQL',
src: 'img/cnmsql.png',
srcDark: 'img/cnmsql.png',
},
items: [
{
type: 'docSidebar',
sidebarId: 'docsSidebar',
position: 'left',
label: 'Docs',
},
{
to: '/api-reference',
label: 'API',
position: 'left',
},
{
to: '/blog',
label: 'Blog',
position: 'left',
},
{
type: 'docsVersionDropdown',
position: 'right',
},
{
href: 'https://github.com/cnmsql/cnmsql',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub repository',
},
],
},
footer: {
style: 'light',
links: [
{
title: 'Docs',
items: [
{
label: 'Overview',
to: '/',
},
{
label: 'Quickstart',
to: '/quickstart',
},
{
label: 'API Reference',
to: '/api-reference',
},
],
},
{
title: 'Guides',
items: [
{
label: 'Replication & Failover',
to: '/replication-failover',
},
{
label: 'Backup & Recovery',
to: '/backup-recovery',
},
{
label: 'Troubleshooting',
to: '/troubleshooting',
},
],
},
{
title: 'Project',
items: [
{
label: 'Blog',
to: '/blog',
},
{
label: 'RSS feed',
// pathname:// links to a static file, not a client-side route.
href: 'pathname:///blog/rss.xml',
},
{
label: 'GitHub',
href: 'https://github.com/cnmsql/cnmsql',
},
{
label: 'Percona Server',
href: 'https://www.percona.com/software/mysql-database/percona-server',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} The CNMSQL - CloudNative for MySQL Authors. Documentation licensed under <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license noopener noreferrer">CC BY 4.0</a>. Built with <a href="https://docusaurus.io/" target="_blank">Docusaurus</a>.<br/><small>CNMSQL - CloudNative for MySQL is an independent project, not affiliated with Oracle, MySQL, the CNCF, or CloudNativePG.</small>`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['go', 'yaml', 'bash'],
},
colorMode: {
defaultMode: 'light',
respectPrefersColorScheme: true,
},
mermaid: {
theme: { light: 'neutral', dark: 'dark' },
},
}),
};
module.exports = config;