-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
Copy pathdocusaurus.config.js
73 lines (70 loc) · 1.64 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
const navbar = require('./config/navbar');
const footer = require('./config/footer');
/**
* @type {import('@docusaurus/types').DocusaurusConfig}
*/
const config = {
title: '飞冰 ICE ',
tagline: ' 基于 React 的应用研发框架',
url: 'https://v3.ice.work',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
favicon: 'img/favicon.ico',
organizationName: 'alibaba',
projectName: 'ice',
themeConfig: {
// announcementBar: {
// id: 'announcementBar-2',
// content: 'ice.js 3,不仅是 PC,更适配移动端能力,<a href="/docs/guide/about">更多</a>',
// isCloseable: true,
// },
navbar,
footer,
// algolia: {
// apiKey: '01f284e7e1c13eac3dc14beb6d8b153d',
// indexName: 'ice',
// },
},
i18n: {
defaultLocale: 'zh-CN',
locales: [
'zh-CN',
],
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./config/sidebars.js'),
// TODO
editUrl:
'https://github.com/alibaba/ice/edit/master/website/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
// TODO
// gtag: {
// trackingID: 'G-QZ0FEKY38G',
// },
},
],
],
plugins: [
require.resolve('./plugins/redirect.js'),
],
};
// if (process.env.USE_LOCAL_SEARCH) {
// 内部站点无法使用 algolia
delete config.themeConfig.algolia;
config.plugins.push([
require.resolve('@easyops-cn/docusaurus-search-local'),
{
hashed: true,
language: ['zh', 'en'],
},
]);
// }
module.exports = config;