-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
310 lines (296 loc) · 9.2 KB
/
docusaurus.config.ts
File metadata and controls
310 lines (296 loc) · 9.2 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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
// Environment Variable Config - fixed redundant imports and removed debug mode
import dotenv from 'dotenv';
dotenv.config({ path: './.env' });
// Main Config
const config: Config = {
title: 'Bankai-Tech Docs',
tagline: 'Debugging is when you are a detective in a crime where you are also the murderer',
favicon: 'img/favcon.ico',
// Adopt Docusaurus Faster and v4
future: {
faster: true,
v4: true,
},
customFields: {
// Mendable API key for AI-powered search functionality
// Get your key at https://mendable.ai
mendableAnonKey: process.env.MENDABLE_KEY,
// Comment System Configuration
comments: {
enableGiscus: true, // Enable/disable Giscus comments
enableDiscord: true, // Enable/disable Discord comments
discordApiUrl: undefined, // Will use environment variable or default
},
},
// Adds Diagram support via Mermaid
markdown: {
mermaid: true,
},
themes: [
'@docusaurus/theme-live-codeblock',
'@docusaurus/theme-mermaid',
[
require.resolve('@easyops-cn/docusaurus-search-local'),
{
hashed: true,
language: ['en'],
indexDocs: true,
indexPages: true,
indexBlog: false,
highlightSearchTermsOnTargetPage: true,
},
],
],
// Set the production url of your site here
url: 'https://docs.bankai-tech.com',
// Set the /<baseUrl>/ pathname under which your site is servedd
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'facebook', // Usually your GitHub org/user name.
projectName: 'HomeLab Docs', // Usually your repo name.
onBrokenLinks: 'throw',
// onBrokenMarkdownLinks: 'warn', // Will be removed in v4
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
// i18n: {
// defaultLocale: 'en',
// locales: ['en'],
// },
presets: [
[
'classic',
{
docs: {
showLastUpdateAuthor: true,
showLastUpdateTime: true,
routeBasePath: '/', // Serve the docs at the site's root
sidebarCollapsible: true,
sidebarPath: './sidebars/customAutogen.ts',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: 'https://github.com/TrueBankai416/BankaiTechDocs/tree/main/',
},
blog: {
showReadingTime: true,
blogTitle: 'Bankai-Tech Blog',
blogDescription: 'News, tutorials, tips, and insights about self-hosting, Docker, homelabs, and tech infrastructure.',
blogSidebarTitle: 'Recent Posts',
blogSidebarCount: 'ALL',
postsPerPage: 10,
editUrl: 'https://github.com/TrueBankai416/BankaiTechDocs/tree/main/',
},
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
plugins: [
// Suppress harmless UMD dynamic require warnings from mermaid's langium dependency
function suppressMermaidWarning() {
return {
name: 'suppress-mermaid-warning',
configureWebpack(config, isServer, utils) {
return {
ignoreWarnings: [
{
module: /vscode-languageserver-types/,
message: /Critical dependency/,
},
],
};
},
};
},
// [
// 'docusaurus-plugin-dotenv',
// {
// id: 'dotenv',
// path: "./.env", // The path to your environment variables.
// safe: false, // If false ignore safe-mode, if true load './.env.example', if a string load that file as the sample
// systemvars: false, // Set to true if you would rather load all system variables as well (useful for CI purposes)
// silent: false, // If true, all warnings will be suppressed
// expand: false, // Allows your variables to be "expanded" for reusability within your .env file
// defaults: false, // Adds support for dotenv-defaults. If set to true, uses ./.env.defaults
// ignoreStub: true
// },
// ],
// [
// 'posthog-docusaurus',
// {
// id: 'posthog',
// apiKey: process.env.POSTHOG_API_KEY,
// appUrl: 'https://us.i.posthog.com', // optional, defaults to "https://us.i.posthog.com"
// enableInDevelopment: false, // optional
// },
// ],
//
],
themeConfig: {
// Adds bar to top of the Page
announcementBar: {
id: 'Pick your Operating System',
content:
'This site is mainly for Ubuntu Systems. For windows, visit <a target="_blank" rel="noopener noreferrer" href="https://docs.demonwarriortech.com">DemonWarriorTech</a>',
backgroundColor: '#fafbfc',
textColor: '#091E42',
isCloseable: true,
},
// Mermaid configuration
mermaid: {
theme: {
light: 'neutral',
dark: 'dark',
},
options: {
fontFamily: 'inherit',
fontSize: 16,
theme: 'neutral',
},
},
// Declare some <meta> tags
metadata: [{ name: 'keywords', content: 'Docs, Nextcloud, Tutorial, Documentation' }],
sidebar: {
sidebarCollapsible: true,
autoCollapseCategories: true,
},
colorMode: {
defaultMode: 'dark',
disableSwitch: false,
respectPrefersColorScheme: false,
},
tableOfContents: {
minHeadingLevel: 2,
maxHeadingLevel: 5,
},
// Replace with your project's social card
image: 'img/social-card.jpg',
// algolia: {
// appId: process.env.ALGOLIA_APP_ID,
// apiKey: process.env.ALGOLIA_API_KEY,
// indexName: 'bankai-tech',
// // Optional: see doc section below
// contextualSearch: true,
// // Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs
// replaceSearchResultPathname: {
// from: '/docs/', // or as RegExp: /\/docs\//
// to: '/',
// },
// // Optional: Algolia search parameters
// searchParameters: {},
// // Optional: path for search page that enabled by default (`false` to disable it)
// searchPagePath: 'search',
// },
navbar: {
title: 'Bankai-Tech Docs',
logo: {
alt: 'My Site Logo',
src: 'img/icon.jpg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'docSidebar',
position: 'left',
label: 'Tutorials',
},
{
type: 'docSidebar',
sidebarId: 'exampleSidebar',
position: 'left',
label: 'Examples',
},
{
type: 'docSidebar',
sidebarId: 'MSwindowsSidebar',
position: 'left',
label: 'MS Windows',
},
{
href: 'https://crowdin.com/project/bankai-tech',
label: 'Help me Translate!',
position: 'right',
},
// {
// type: 'localeDropdown',
// position: 'right',
// },
{ to: 'https://buymeacoffee.com/BankaiTech', label: 'Buy Me a Beer', position: 'left' },
{ to: '/blog', label: 'Blog', position: 'left' },
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Tutorials',
to: 'Docker/Introduction',
},
],
},
{
title: 'Examples',
items: [
{
label: 'Examples',
to: 'Examples/Reverse Proxies/Introduction',
},
],
},
{
title: 'Community',
items: [
{
label: 'Discord',
href: 'https://discord.gg/6THYdvayjg',
},
{
label: 'Matrix',
href: 'https://matrix.to/#/#bankai-tech:matrix.bankai-tech.com',
},
],
},
{
title: 'Support Me',
items: [
{
label: 'Buy me a Beer',
href: 'https://buymeacoffee.com/BankaiTech',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Bankai-Tech Docs`,
},
prism: {
darkTheme: prismThemes.dracula,
theme: prismThemes.github,
additionalLanguages: [
'dax',
'csharp',
'powerquery',
'powershell',
'yaml',
'nginx',
'editorconfig',
'typescript',
'javascript',
'systemd',
'ini',
'bash',
'apacheconf',
'docker',
],
},
} satisfies Preset.ThemeConfig,
};
export default config;