forked from yewstack/yew
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.js
178 lines (176 loc) · 5.34 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
const { API_BUTTON } = require('./src/constants')
const editUrl = 'https://github.com/yewstack/yew/blob/master/website/'
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: 'Yew',
tagline:
'Yew is a modern Rust framework for creating multi-threaded front-end web apps with WebAssembly.',
url: 'https://yew.rs',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/logo.png',
organizationName: 'yewstack', // Usually your GitHub org/user name.
projectName: 'yew', // Usually your repo name.
themeConfig: {
hideableSidebar: true,
navbar: {
title: 'Yew',
logo: {
alt: 'Yew Logo',
src: 'img/logo.png',
},
items: [
{
type: 'docsVersionDropdown',
position: 'left',
},
{
type: 'localeDropdown',
position: 'left',
},
{
type: 'doc',
position: 'left',
docId: 'getting-started/introduction',
label: 'Docs',
},
{
type: 'doc',
position: 'left',
docId: 'tutorial/index',
label: 'Tutorial',
},
{
docsPluginId: 'community',
type: 'doc',
position: 'right',
docId: 'awesome',
label: 'Community',
},
{
position: 'right',
to: 'blog',
label: 'Blog',
},
{
href: 'https://docs.rs/yew',
position: 'right',
label: API_BUTTON,
},
{
href: 'https://github.com/yewstack/yew',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Support',
items: [
{
label: 'Sponsor Project',
href: 'https://opencollective.com/yew',
},
],
},
{
title: 'Participate',
items: [
{
label: 'GitHub',
href: 'https://github.com/yewstack/yew',
},
{
label: 'Discord',
href: 'https://discord.gg/VQck8X4',
},
{
label: 'Twitter',
href: 'https://twitter.com/yewstack',
},
],
},
{
title: 'More',
items: [
{
label: 'Yew Awesome',
href: 'https://github.com/jetli/awesome-yew',
},
],
},
],
},
prism: {
additionalLanguages: ['rust', 'toml'],
},
googleAnalytics: {
trackingID: 'UA-141789564-1',
anonymizeIP: true,
},
},
i18n: {
defaultLocale: 'en',
locales: ['en', 'ja', 'zh-CN', 'zh-TW'],
},
plugins: [
'content-pages',
[
'@docusaurus/theme-classic',
{
customCss: require.resolve('./src/css/custom.css'),
},
],
[
'@docusaurus/plugin-content-docs',
{
path: 'docs',
sidebarPath: require.resolve('./sidebars/docs.js'),
editUrl,
routeBasePath: '/docs',
},
],
[
'@docusaurus/plugin-content-docs',
{
id: 'community',
path: 'community',
sidebarPath: require.resolve('./sidebars/community.js'),
routeBasePath: '/community',
editUrl,
},
],
[
'@docusaurus/plugin-content-blog',
{
path: 'blog',
blogTitle: 'Yew Blog',
editUrl,
},
],
[
'client-redirects',
{
redirects: [
// this handles the redirect from `/next` -> to the (current) first item in the docs sidebar
// note: if the first item is changed, it should be reflected here
{
to: '/docs/next/getting-started/introduction', // string
from: ['/docs/next'], // string | string[]
},
],
},
],
[
'@easyops-cn/docusaurus-search-local',
{
hashed: true,
indexBlog: false,
},
],
],
}