-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdev.config.js
196 lines (189 loc) · 5.96 KB
/
dev.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
// @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';
import paraAnchor from './src/plugins/para-anchor.js';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: '慧灯禅修班',
tagline: '学修指南及参考课程进度安排',
url: 'https://huidengchanxiu.net',
baseUrl: '/',
onBrokenLinks: 'ignore',
onBrokenMarkdownLinks: 'ignore',
favicon: 'img/favicon.ico',
organizationName: 'huidengvan', // Usually your GitHub org/user name.
projectName: 'huidengchanxiu', // Usually your repo name.
i18n: {
defaultLocale: 'zh-Hans',
locales: ['zh-Hans'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: './sidebars.js',
},
theme: {
customCss: './src/css/custom.css',
},
}),
],
],
plugins: [
// [
// '@docusaurus/plugin-content-docs',
// {
// id: 'wsb',
// path: 'wsb',
// routeBasePath: 'wsb',
// sidebarPath: require.resolve('./sidebars.js'),
// rehypePlugins: [paraAnchor],
// },
// ],
// [
// '@docusaurus/plugin-content-docs',
// {
// id: 'books',
// path: 'books',
// routeBasePath: 'books',
// sidebarPath: require.resolve('./sidebars.js'),
// rehypePlugins: [paraAnchor],
// },
// ],
// [
// '@docusaurus/plugin-content-docs',
// {
// id: 'refs',
// path: 'refs',
// routeBasePath: 'refs',
// sidebarPath: require.resolve('./sidebars.js'),
// rehypePlugins: [paraAnchor],
// },
// ],
[
'@docusaurus/plugin-content-docs',
{
id: '4jx',
path: '4jx',
routeBasePath: '4jx',
sidebarPath: require.resolve('./sidebars.js'),
rehypePlugins: [paraAnchor],
},
],
// [
// '@docusaurus/plugin-content-docs',
// {
// id: '5jx',
// path: '5jx',
// routeBasePath: '5jx',
// sidebarPath: require.resolve('./sidebars.js'),
// rehypePlugins: [paraAnchor],
// },
// ],
],
themes: [],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
{
docs: {
sidebar: {
hideable: true,
},
},
navbar: {
title: '慧灯禅修',
logo: {
alt: 'HuidengVan',
src: 'img/hdlogo.png',
},
items: [
// {
// type: 'doc',
// docId: 'intro',
// position: 'left',
// label: '学修指南',
// },
// {
// type: 'doc',
// docId: 'b1/1-01',
// docsPluginId: 'books',
// position: 'left',
// label: '课程法本',
// },
// {
// type: 'doc',
// docId: 'index',
// docsPluginId: 'refs',
// position: 'left',
// label: '参考法本',
// },
// {
// type: 'doc',
// docId: 'book1',
// docsPluginId: 'wsb',
// position: 'left',
// label: '闻思班',
// },
{
type: 'doc',
docId: '1xm',
docsPluginId: '4jx',
position: 'left',
label: '四加行',
},
// {
// type: 'doc',
// docId: '1gy',
// docsPluginId: '5jx',
// position: 'left',
// label: '五加行',
// },
],
},
footer: {
style: 'light',
links: [
{
title: 'Docs',
items: [
{
label: '学修指南',
to: '/docs/intro',
},
],
},
{
title: '法本',
items: [
{
label: '第一册',
href: '/books/b1',
}
],
},
],
copyright: `慧灯小组温哥华( <a href='https://www.huidengvan.com' target='_blank'>huidengvan.com</a> / [email protected])发心制作. Built with Docusaurus. ${new Date().getFullYear()} `,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
},
// scripts: [{ src: '/js/global.js', async: false, },],
webpack: {
jsLoader: (isServer) => ({
loader: require.resolve('esbuild-loader'),
options: {
loader: 'jsx',
format: isServer ? 'cjs' : undefined,
target: isServer ? 'node12' : 'es2017',
},
}),
},
};
export default config;