-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocusaurus.config.ts
299 lines (287 loc) · 8.44 KB
/
docusaurus.config.ts
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
// See available themes at https://github.com/FormidableLabs/prism-react-renderer/tree/master/src/themes
import { themes as prismThemes } from 'prism-react-renderer'
import type { Config } from '@docusaurus/types'
import type * as Preset from '@docusaurus/preset-classic'
// API reference: https://docusaurus.io/docs/api/docusaurus-config
const config: Config = {
title: 'Albertpedia',
tagline: 'Albert Vila Calvo',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://albert.wiki',
// Set the /<baseUrl>/ pathname under which your site is served
// 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: 'AlbertVilaCalvo', // Usually your GitHub org/user name.
projectName: 'Wiki', // Usually your repo name.
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internalization, 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: {
// Change routes from '/docs/cli/git' to '/cli/git'.
// See Docs-only mode https://docusaurus.io/docs/docs-introduction#docs-only-mode
routeBasePath: '/',
sidebarPath: './sidebars.ts',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
// editUrl: 'https://github.com/AlbertVilaCalvo/Wiki/edit/main/',
// Having breadcrumbs is pointless since I rarely have nested docs
breadcrumbs: false,
// https://docusaurus.io/docs/sidebar/items#expanded-categories-by-default
sidebarCollapsed: false,
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
// editUrl: 'https://github.com/AlbertVilaCalvo/Wiki/edit/main/',
},
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themeConfig: {
navbar: {
title: 'Home',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
items: [
{
to: 'git',
activeBasePath: 'git',
label: 'Git',
position: 'left',
},
{
to: 'cli/commands',
activeBasePath: 'cli',
label: 'CLI',
position: 'left',
},
{
to: 'dev/tools-and-resources',
activeBaseRegex: 'dev/.+',
label: 'Dev',
position: 'left',
},
{
to: 'javascript',
activeBasePath: 'js',
label: 'JS',
position: 'left',
},
{
to: 'app',
activeBasePath: 'app',
label: 'App',
position: 'left',
},
{
to: 'cloud',
activeBasePath: 'cloud',
label: 'Cloud',
position: 'left',
},
{
to: 'aws',
activeBasePath: 'aws',
label: 'AWS',
position: 'left',
},
{
// Using "to: 'http/http'" results in 404 when clicking the link 'HTTP' on the sidebar,
// because it links to the page /http/http, which doesn't exist.
to: 'http',
activeBasePath: 'http',
label: 'HTTP',
position: 'left',
},
{
to: 'web',
activeBasePath: 'web',
label: 'Web',
position: 'left',
},
{
to: 'html',
activeBasePath: 'html',
label: 'HTML',
position: 'left',
},
{
to: 'css',
activeBasePath: 'css',
label: 'CSS',
position: 'left',
},
{
to: 'databases',
activeBasePath: 'databases',
label: 'DB',
position: 'left',
},
{
to: 'python',
activeBasePath: 'python',
label: 'Py',
position: 'left',
},
{
to: 'auth/authentication',
activeBasePath: 'auth',
label: 'Auth',
position: 'left',
},
{
to: 'misc/battery',
activeBasePath: 'misc',
label: 'Misc',
position: 'left',
},
{
to: 'disseny',
activeBasePath: 'disseny',
label: 'Disseny',
position: 'left',
},
{
to: 'ux',
activeBasePath: 'uxs',
label: 'UX',
position: 'left',
},
{
to: 'corrector',
label: 'Corrector',
position: 'right',
},
// {
// to: 'docs/doc1',
// activeBasePath: 'docs',
// label: 'Docs',
// position: 'right',
// },
// {to: 'blog', label: 'Blog', position: 'right'},
// {
// href: 'https://github.com/facebook/docusaurus',
// label: 'GitHub',
// position: 'right',
// },
],
},
footer: {
style: 'dark',
// Aquí puc tenir 1 llista de links enlloc de columnes. Veure
// https://docusaurus.io/docs/api/themes/configuration#footer-links
// https://github.com/facebook/docusaurus/pull/6132
// https://github.com/facebook/docusaurus/issues/6101
links: [
{
title: 'Docs',
items: [
{
label: 'Style Guide',
to: 'docs/doc1',
},
{
label: 'Markdown Features',
to: 'docs/markdown-features',
},
],
},
{
title: 'Community',
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/users/4034572/albert-vila-calvo',
},
{
label: 'Twitter',
href: 'https://twitter.com/AlbertVilaCalvo',
},
{
label: 'LinkedIn',
href: 'https://www.linkedin.com/in/albertvilacalvo',
},
],
},
{
title: 'More',
items: [
{
label: 'Personal Website',
href: 'https://albert.vc',
},
// {
// label: 'Blog',
// to: 'blog',
// },
{
label: 'GitHub',
href: 'https://github.com/AlbertVilaCalvo',
},
{
label: 'Source Code',
href: 'https://github.com/AlbertVilaCalvo/Wiki',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Albert Vila Calvo`,
},
// https://docusaurus.io/docs/api/themes/configuration#codeblock
// If you use the line highlighting Markdown syntax, you might need to
// specify a different highlight background color for the dark mode syntax
// highlighting theme. See https://docusaurus.io/docs/markdown-features/code-blocks#line-highlighting
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
// Base set of languages: https://github.com/FormidableLabs/prism-react-renderer/blob/master/packages/generate-prism-languages/index.ts#L9-L25
// All supported languages: https://prismjs.com/#supported-languages
additionalLanguages: ['bash', 'json', 'hcl'],
},
docs: {
// https://docusaurus.io/docs/sidebar#theme-configuration
sidebar: {
// Show 'Collapse sidebar' button
hideable: true,
},
},
} satisfies Preset.ThemeConfig,
// ADDED BY ME
// ***********
// https://docusaurus.io/docs/api/docusaurus-config#customfields
customFields: {
description: 'The personal Wiki of Albert Vila Calvo',
},
// Remove 'Previous' and 'Next' links
// https://docusaurus.io/docs/markdown-features#front-matter
// https://docusaurus.io/docs/api/docusaurus-config#markdown
markdown: {
parseFrontMatter: async (params) => {
// Reuse the default parser
const result = await params.defaultParseFrontMatter(params)
result.frontMatter.pagination_prev = null
result.frontMatter.pagination_next = null
return result
},
},
}
export default config