forked from theme-nexmoe/hexo-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
158 lines (153 loc) · 4.4 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 lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: 'Hexo Theme Nexmoe',
tagline: '🔥 一个比较特别的 Hexo 主题',
url: 'https://docs.nexmoe.com',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'theme-nexmoe', // Usually your GitHub org/user name.
projectName: 'Hexo Theme Nexmoe', // Usually your repo name.
i18n: {
defaultLocale: 'zh-cn',
locales: ['zh-cn'],
},
themeConfig: {
announcementBar: {
id: 'language', // 用于辨别此消息的值。
backgroundColor: '#fafbfc', // 默认为 `#fff`.
content: 'If you are a non-Chinese user, I recommend you to use <a href="https://translate.google.com/translate?hl=&sl=zh-CN&tl=en&u=https://docs.nexmoe.com/">Google Translate</a> to translate this document.',
},
navbar: {
title: 'Nexmoe',
items: [
{
type: 'doc',
docId: 'welcome',
position: 'left',
label: '文档',
},
{to: '/blog', label: '博客', position: 'left'},
{to: '/contribution', label: '参与贡献', position: 'left'},
{
href: 'https://github.com/theme-nexmoe/hexo-theme-nexmoe',
label: 'GitHub',
position: 'right',
},
{
type: 'search',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: '我有问题',
to: '/question',
},
{
label: '常见问题',
to: '/faq',
},
],
},
{
title: 'Community',
items: [
{
label: 'GitHub',
href: 'https://github.com/theme-nexmoe/hexo-theme-nexmoe',
},
{
label: '论坛',
href: 'https://github.com/theme-nexmoe/hexo-theme-nexmoe/discussions',
},
{
label: 'QQ群',
href: 'https://jq.qq.com/?_wv=1027&k=1YL6FmUS',
},
],
},
{
title: 'More',
items: [
{
label: '博客',
to: '/blog',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Nexmoe. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
googleAdsense: { dataAdClient: 'ca-pub-2058306854838448' },
algolia: {
apiKey: '97d0ec378a6740430371860e28d1f485',
indexName: 'nexmoe',
// Optional: see doc section below
contextualSearch: true,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl:
'https://github.com/theme-nexmoe/hexo-docs/edit/master/',
/**
* 您站点文档部分的 URL 路由。
* *请务必不要*添加斜杠。
* 注:您可以设置为 `/` 以在根目录提供文档。
*/
routeBasePath: '/',
/**
* 是否显示最近更新文档的作者。
*/
showLastUpdateAuthor: true,
/**
* 是否显示文档的最新更新日期。
*/
showLastUpdateTime: false,
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://github.com/theme-nexmoe/hexo-docs/edit/master/blog/',
/**
* 截断标记,可为正则表达式或字符串。
*/
truncateMarker: /<!--\s*(more)\s*-->/,
/**
* 显示博文的估计阅读时间。
*/
showReadingTime: false,
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
plugins: [
path.resolve(__dirname, 'plugin/plugin-google-adsense'),
path.resolve(__dirname, 'plugin/plugin-baidu-tongji'),
'@docusaurus/plugin-ideal-image'
],
};