-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
398 lines (377 loc) · 11.6 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
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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
import {themes as prismThemes} from 'prism-react-renderer';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: '080f53',
tagline: "Ramblings of a technical writer in Japan🗾",
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://www.080f53.com',
// 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: 'josh-wong', // Usually your GitHub org/user name.
projectName: 'josh-wong.github.io', // Usually your repo name.
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
// 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-us',
locales: ['en-us', 'ja-jp'],
localeConfigs: {
'en-us': {
label: 'English',
direction: 'ltr',
htmlLang: 'en-US',
calendar: 'gregory',
path: 'versioned_docs/en-us',
},
'ja-jp': {
label: '日本語',
direction: 'ltr',
htmlLang: 'ja-JP',
calendar: 'gregory',
path: 'versioned_docs/ja-jp',
},
},
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: 'docs',
routeBasePath: '/',
sidebarPath: './sidebars.js',
// // Please change this to your repo.
// // Remove this to remove the "edit this page" links.
// // editUrl:
// // 'https://github.com/josh-wong/josh-wong.github.io/',
},
blog: {
blogSidebarTitle: 'All posts',
blogSidebarCount: 'ALL',
feedOptions: {
type: 'all',
copyright: 'Copyright © ${new Date().getFullYear()} 080f53',
limit: null,
},
routeBasePath: '/',
showReadingTime: true,
onUntruncatedBlogPosts: 'ignore',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
// editUrl:
// 'https://github.com/josh-wong/josh-wong.github.io',
},
googleTagManager: {
containerId: 'GT-5M8TXX7',
},
gtag: {
trackingID: 'G-PMP34RZWN2P',
anonymizeIP: true,
},
theme: {
customCss: './src/css/custom.css',
},
}),
],
],
plugins: [
require.resolve('docusaurus-plugin-image-zoom'),
[
'@docusaurus/plugin-pwa',
{
debug: true,
offlineModeActivationStrategies: [
'appInstalled',
'standalone',
'queryString',
'always',
'mobile',
],
pwaHead: [
{
tagName: 'link',
rel: 'icon',
href: 'img/favicon.png',
},
{
tagName: 'link',
rel: 'manifest',
href: '/manifest.json', // your PWA manifest
},
{
tagName: 'meta',
name: 'theme-color',
content: '#080f53',
},
{
tagName: 'meta',
name: 'apple-mobile-web-app-capable',
content: 'yes',
},
{
tagName: 'meta',
name: 'apple-mobile-web-app-status-bar-style',
content: '#080f53',
},
{
tagName: 'link',
rel: 'apple-touch-icon',
href: '/img/favicon.png',
},
{
tagName: 'link',
rel: 'mask-icon',
href: '/img/favicon.svg',
color: '#080f53',
},
{
tagName: 'meta',
name: 'msapplication-TileImage',
content: '/img/favicon.png',
},
{
tagName: 'meta',
name: 'msapplication-TileColor',
content: '#080f53',
},
],
},
],
],
markdown: {
mermaid: true,
},
themes: [
'@docusaurus/theme-mermaid',
'docusaurus-theme-github-codeblock'
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// announcementBar: {
// id: 'announcement_bar',
// content:
// 'MESSAGE WITH A <a href="URL">LINK IF NECESSARY</a>!',
// backgroundColor: '#7c83c2',
// textColor: '#ffffff',
// isCloseable: true,
// },
docs: {
sidebar: {
hideable: true,
},
},
// Replace with your project's social card
image: 'img/site-logo.png',
navbar: {
title: '',
logo: {
alt: '080f53 logo',
src: 'img/site-logo.png',
srcDark: 'img/site-logo-dark.png',
},
items: [
// {
// type: 'docSidebar',
// sidebarId: 'sidebar',
// position: 'left',
// label: 'Tutorial',
// },
{to: '/', label: 'Blog', position: 'left'},
{
type: 'dropdown',
label: 'Projects',
position: 'left',
items: [
{
type: 'doc',
label: 'Baird beer profile quadrants🍺',
docId: 'baird-beer-quadrants/index',
},
{
type: 'doc',
label: 'Bitcoin Cash Node on Raspberry Pi🪙',
docId: 'bitcoin-cash-node-on-raspberry-pi/index',
},
{
type: 'doc',
label: 'Music collection💿',
docId: 'music-collection/index',
},
{
type: 'doc',
label: 'Microsoft Zune device and software setup🎵',
docId: 'zune-software-setup/index',
},
{
type: 'doc',
label: 'passGen🔐',
docId: 'passgen/index',
},
{
label: 'Signal sticker pack - "Why Bitcoin Cash?"🎁',
href: 'https://signal.art/addstickers/#pack_id=183a3ca8d7ccdcdb8fa7728b17453fbc&pack_key=e9ac42b0e7276edd92d293321d2e51cca64e5744bad567fd9579b51abb78773d',
},
],
},
{to: 'about', label: 'About', position: 'left'},
// Custom notification as a React component.
{
type: 'custom-NotificationBell',
position: 'right',
notifications: [
{
id: 3,
message: 'New feature!: Site notifications🚨',
url: '/2024/11/20/site-notification-feature'
},
{
id: 2,
message: 'Check out the unofficial Baird beer flavor quadrants🍺',
url: '/baird-beer-quadrants'
},
{
id: 1,
message: 'Enjoy Baird beer? Ask the unofficial AI chatbot for recommendations🤖',
url: 'https://typebot.co/baird-beer-recommendations-experimental-080f53'
},
],
},
{
className: 'header-rss-link',
href: 'https://www.080f53.com/rss.xml',
position: 'right',
'aria-label': 'RSS',
},
{
className: 'header-github-link',
href: 'https://github.com/josh-wong/josh-wong.github.io',
position: 'right',
'aria-label': 'GitHub logo',
},
{
className: 'header-better-stack-icon',
href: 'https://status.080f53.com',
position: 'right',
'aria-label': 'Better Stack logo',
},
],
},
footer: {
style: 'dark',
links: [
{
title: '080F53',
items: [
{
label: 'About',
to: '/about',
},
],
},
{
title: 'Projects',
items: [
{
label: 'Personal samples',
to: '/projects',
},
],
},
{
title: 'Community',
items: [
{
label: 'GitHub',
href: 'https://github.com/josh-wong',
},
{
label: 'LinkedIn',
href: 'https://www.linkedin.com/in/wongjoshua',
},
{
label: 'Twitter',
href: 'https://twitter.com/080f53',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} 080f53. <a href="https://docusaurus.io/" style="color: #757cbd">Built with Docusaurus</a>.`,
},
colorMode: {
defaultMode: 'light',
respectPrefersColorScheme: true,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
mermaid: {
theme: {
light: 'base',
dark: 'base',
},
options: {
themeVariables: {
primaryColor: '#D5EAFF',
primaryTextColor: '#3D4144',
primaryBorderColor: '#080f53',
lineColor: '#3D4144',
secondaryColor: '#D5EAFF',
tertiaryColor: '#D5EAFF',
},
},
},
zoom: {
selector: '.markdown :not(em) > img',
background: {
light: 'rgb(255, 255, 255)',
dark: 'rgb(50, 50, 50)'
},
config: {
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
}
},
algolia: {
// The application ID provided by Algolia
appId: 'E5HTYXABYL',
// Public API key: it is safe to commit it
apiKey: 'bb14e2a521033a0d29bb5753f7329567',
indexName: '080f53',
// 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: 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',
// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
insights: true,
//... other Algolia params
},
// GitHub code block theme configuration
codeblock: {
showGithubLink: true,
githubLinkLabel: 'View on GitHub',
},
}),
};
export default config;