-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
158 lines (157 loc) · 5.68 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
const path = require('path')
const docusaurus = require('@docusaurus/types')
/**
* @type {docusaurus.DocusaurusConfig}
*/
module.exports = {
title: 'TaroX',
tagline: '致力于创建 Taro 第三方生态社区',
url: 'https://tarojsx.github.io',
baseUrl: '/',
favicon: 'img/favicon.ico',
organizationName: 'tarojsx', // Usually your GitHub org/user name.
projectName: 'tarojsx.github.io', // Usually your repo name.
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
// It is recommended to set document id as docs home page (`docs/` path).
homePageId: 'index',
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
// editUrl: 'https://github.com/tarojsx/tarojsx.github.io/edit/master/docs',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// editUrl: 'https://github.com/tarojsx/tarojsx.github.io/edit/master/block',
},
theme: {
customCss: require.resolve('./src/css/custom.scss'),
},
},
],
],
plugins: [require.resolve('docusaurus-plugin-sass'), path.resolve(__dirname, 'docusaurus-plugin-tarojsx')],
themes: [require.resolve('@docusaurus/theme-classic'), require.resolve('@docusaurus/theme-live-codeblock')],
themeConfig: {
// announcementBar: {
// id: 'github-star',
// content:
// '<span class="text-white">⭐️ 如果你喜欢 TaroX 项目,请给一个 Star <a target="_blank" rel="noopener noreferrer" href="https://github.com/tarojsx">GitHub</a>! ⭐️</span>',
// },
navbar: {
hideOnScroll: true,
title: 'TaroX',
logo: {
alt: 'TaroX Logo',
src: 'img/logo.svg',
},
links: [
{
to: 'docs/ui/README',
activeBasePath: 'docs/ui', // 以此开头的路径点亮
label: 'UI',
position: 'left',
},
{
to: 'docs/hooks/README',
activeBasePath: 'docs/hooks',
label: 'Hooks',
position: 'left',
},
{
to: 'docs/library/README',
activeBasePath: 'docs/library',
label: 'Library',
position: 'left',
},
{
to: 'docs/polyfill/README',
activeBasePath: 'docs/polyfill',
label: 'Polyfill',
position: 'left',
},
{
to: 'docs/history/README',
activeBasePath: 'docs/history',
label: 'History',
position: 'left',
},
{
to: 'blog',
label: '博客',
position: 'left',
},
{
href: 'https://github.com/tarojsx',
className: 'octicon-mark-github',
position: 'right',
},
],
},
// sidebarCollapsible: false, // 侧边栏分类禁止折叠
footer: {
style: 'dark',
links: [
{
title: '文档',
items: [
{
label: '重新发明的 UI',
to: 'docs/ui/README',
},
{
label: '必备 Hooks',
to: 'docs/hooks/README',
},
{
label: '第三方 Library',
to: 'docs/library/README',
},
{
label: '运行时补丁 Polyfill',
to: 'docs/polyfill/README',
},
{
label: 'History API',
to: 'docs/history/README',
},
],
},
{
title: '社区',
items: [
{
label: '博客',
to: 'blog',
},
{
label: 'GitHub',
href: 'https://github.com/tarojsx',
},
],
},
{
title: '资源',
items: [
{
label: '国内镜像站点 🇨🇳',
href: 'https://tarojsx.gitee.io',
},
{
label: '海外站点 🌏',
href: 'https://tarojsx.github.io',
},
],
},
],
copyright: `Copyright © 2019-${new Date().getFullYear()} TaroX org. Built with Docusaurus.`,
},
prism: {
theme: require('prism-react-renderer/themes/github'),
darkTheme: require('prism-react-renderer/themes/vsDark'), // 黑暗模式代码高亮主题
},
},
}