-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
docusaurus.config.js
182 lines (182 loc) · 5.3 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
179
180
181
182
module.exports = {
title: 'Node SerialPort',
tagline: 'Talk to your Serial devices with JavaScript',
url: 'https://serialport.io',
baseUrl: '/',
trailingSlash: true,
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
favicon: 'img/serialport-logo.png',
organizationName: 'serialport', // Usually your GitHub org/user name.
projectName: 'website', // Usually your repo name.
themeConfig: {
colorMode: {
defaultMode: 'light',
disableSwitch: true,
},
navbar: {
title: 'Node SerialPort',
logo: {
alt: 'Node SerialPort Logo',
src: 'img/serialport-logo-small.svg',
},
items: [
{
to: 'docs/',
activeBasePath: 'docs',
label: 'Docs',
position: 'left',
},
{
type: 'docsVersionDropdown',
position: 'left',
dropdownActiveClassDisabled: true,
dropdownItemsAfter: [
{
to: '/versions',
label: 'All versions',
},
],
},
{
href: 'https://opencollective.com/serialport/updates',
label: 'Blog',
position: 'right'
},
{
href: 'https://github.com/serialport/node-serialport',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'About',
to: 'docs/',
},
{
label: 'Code of Conduct',
to: 'docs/code-of-conduct',
},
],
},
{
title: 'Community',
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/node-serialport',
},
{
label: 'Twitter',
href: 'https://twitter.com/reconbot',
},
],
},
{
title: 'More',
items: [
{
href: 'https://opencollective.com/serialport/updates',
label: 'Blog'
},
{
label: 'GitHub',
href: 'https://github.com/serialport/node-serialport',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Francis Gulotta`,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl: 'https://github.com/serialport/website/edit/master/',
/**
* Whether to display the author who last updated the doc.
*/
showLastUpdateAuthor: true,
/**
* Whether to display the last date the doc was updated.
*/
showLastUpdateTime: true,
/**
* Skip the next release docs when versioning is enabled.
* This will not generate HTML files in the production build for documents
* in `/docs/next` directory, only versioned docs.
*/
includeCurrentVersion: true,
/**
* The last version is the one we navigate to in priority on versioned sites
* It is the one displayed by default in docs navbar items
* By default, the last version is the first one to appear in versions.json
* By default, the last version is at the "root" (docs have path=/docs/myDoc)
* Note: it is possible to configure the path and label of the last version
* Tip: using lastVersion: 'current' make sense in many cases
*/
// lastVersion: undefined,
/**
* The docusaurus versioning defaults don't make sense for all projects
* This gives the ability customize the label and path of each version
* You may not like that default version
*/
versions: {
/*
Example configuration:
current: {
label: 'Android SDK v2.0.0 (WIP)',
path: 'android-2.0.0',
},
'1.0.0': {
label: 'Android SDK v1.0.0',
path: 'android-1.0.0',
},
*/
},
/**
* Sometimes you only want to include a subset of all available versions.
* Tip: limit to 2 or 3 versions to improve startup and build time in dev and deploy previews
*/
onlyIncludeVersions: undefined, // ex: ["current", "1.0.0", "2.0.0"]
sidebarCollapsible: false,
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl: 'https://github.com/serialport/website/edit/master/blog/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
plugins: [
[ require.resolve('docusaurus-lunr-search'), {
languages: ['en'], // language codes,
excludeRoutes: [
'docs/next',
'docs/next/**/*',
'docs/8.x.x/**/*',
'docs/8.x.x/',
'docs/7.x.x/**/*',
'docs/7.x.x/',
]
}]
],
clientModules: [
require.resolve('./static/css/asciinema-player.css'),
],
};