forked from HakuyaLabs/warudo-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.ts
159 lines (148 loc) · 4.38 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
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import {themes as prismThemes} from 'prism-react-renderer';
const config: Config = {
title: 'Warudo Handbook',
tagline: '',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://docs.warudo.app',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
// trailingSlash: false,
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'HakuyaLabs', // Usually your GitHub org/user name.
projectName: 'Warudo-doc', // Usually your repo name.
onBrokenLinks: 'warn',
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', 'zh', 'jp', 'ko'],
localeConfigs: {
en: {
label: 'English',
htmlLang: 'en-GB',
},
zh: {
label: '简体中文',
htmlLang: 'zh-Hans',
},
jp: {
label: '日本語',
htmlLang: 'ja',
},
ko: {
label: '한국어',
htmlLang: 'ko',
},
},
},
scripts: [
{src: 'https://hm.baidu.com/hm.js?c35709853d215762230812b0ef3005d0', async: true}
],
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/HakuyaLabs/warudo-doc/master/',
editLocalizedFiles: true,
showLastUpdateAuthor: true,
showLastUpdateTime: true
},
theme: {
customCss: [
require.resolve('./src/css/common.scss'),
require.resolve('./src/css/custom.css'),
require.resolve('./src/css/in-app.scss')
],
},
gtag: {
trackingID: 'G-Q2QBCHC2X2',
},
sitemap: {
changefreq: 'daily',
priority: 0.5,
filename: 'sitemap.xml',
},
},
],
],
plugins: [
'docusaurus-plugin-sass',
'docusaurus-plugin-image-zoom'
],
themeConfig:
{
image: 'img/favicon.png',
navbar: {
title: 'Warudo',
logo: {
alt: 'Warudo',
src: 'img/logo.webp',
href: '#',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Handbook',
},
{
position: 'left',
label: 'Home',
href: 'https://warudo.app/',
target: '_blank',
},
{
type: 'localeDropdown',
position: 'right'
},
],
},
footer: {
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['csharp'],
},
colorMode: {
defaultMode: 'dark',
disableSwitch: false,
respectPrefersColorScheme: true,
},
zoom: {
selector: '.markdown img',
background: {
light: 'var(--ifm-background-surface-color)',
dark: 'var(--ifm-background-surface-color)'
},
config: {
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
}
},
algolia: {
appId: 'UVVN89W9VO',
apiKey: '019eab3095bb177f3955cd0fd397921d',
indexName: 'warudo',
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',
// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
insights: false,
},
} satisfies Preset.ThemeConfig,
};
export default config;