-
Notifications
You must be signed in to change notification settings - Fork 26
/
docusaurus.config.js
261 lines (261 loc) · 7.47 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
module.exports = {
title: "Centrifugo",
tagline: "Centrifugo – scalable real-time messaging server in a language-agnostic way. Set up once and forever.",
url: "https://centrifugal.dev",
baseUrl: "/",
trailingSlash: false,
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.png",
organizationName: "centrifugal",
projectName: "centrifugal.dev",
themeConfig: {
algolia: {
appId: 'EPXZ1LXJ33',
apiKey: 'b50ce04cfb6a94729c0b970fd52eb16a',
indexName: 'centrifugal',
contextualSearch: true
},
prism: {
additionalLanguages: ["php", "dart", "swift", "java", "json"],
},
colorMode: {
defaultMode: "dark"
},
image: "img/centrifugo_soc.png",
navbar: {
hideOnScroll: true,
title: "Centrifugo",
logo: {
alt: "Centrifugo Logo",
src: "img/logo.svg",
},
items: [
{
type: 'doc',
docId: 'getting-started/introduction',
label: "Getting Started",
position: "left",
},
{
type: 'doc',
docId: 'tutorial/intro',
label: "Grand tutorial",
position: "left",
},
{
type: 'doc',
docId: 'server/configuration',
label: "Server guide",
position: "left",
},
{
type: 'doc',
docId: 'transports/overview',
label: "Real-time transports / SDK",
position: "left",
},
{
type: 'doc',
docId: 'pro/overview',
label: "Centrifugo PRO ♻️",
position: "left",
},
{
type: 'doc',
docId: "faq/faq_index",
label: "FAQ",
position: "left",
},
{ to: 'blog', label: 'Blog', position: 'left' },
{
href: "https://github.com/centrifugal/centrifugo",
position: "right",
className: "header-github-link",
"aria-label": "GitHub repository",
},
{
type: 'docsVersionDropdown',
position: 'right',
dropdownActiveClassDisabled: true
},
],
},
footer: {
style: "dark",
links: [
{
title: "Contact us",
items: [
{
label: "Send e-mail",
to: "mailto:[email protected]",
},
],
},
{
title: "Community",
items: [
{
label: "Telegram",
href: "https://t.me/joinchat/U57MI8Lam9mhpuhd",
},
{
label: "Discord",
href: "https://discord.gg/tYgADKx",
},
{
label: "Twitter",
href: "https://twitter.com/centrifugalabs",
},
],
},
{
title: "More",
items: [
{
label: "Attributions",
to: "docs/attributions",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Centrifugal Labs LTD`,
},
},
presets: [
[
"@docusaurus/preset-classic",
{
sitemap: {
changefreq: 'weekly',
priority: 0.5,
ignorePatterns: ['/license_exchange_*'],
filename: 'sitemap.xml',
},
docs: {
versions: {
current: {
label: "v5",
badge: false
},
"4": {
label: "v4",
badge: false
},
"3": {
label: "v3",
badge: false
}
},
lastVersion: "current",
breadcrumbs: false,
sidebarPath: require.resolve("./src/sidebars"),
editUrl:
"https://github.com/centrifugal/centrifugal.dev/edit/main",
},
gtag: {
trackingID: 'G-NZRQD92LEX',
anonymizeIP: true,
},
blog: {
showReadingTime: true,
/**
* Path to data on filesystem relative to site dir.
*/
path: 'blog',
/**
* Base url to edit your site.
* Docusaurus will compute the final editUrl with "editUrl + relativeDocPath"
*/
editUrl: 'https://github.com/centrifugal/centrifugal.dev/edit/main/',
/**
* For advanced cases, compute the edit url for each markdown file yourself.
*/
editUrl: ({ locale, blogDirPath, blogPath, permalink }) => {
return `https://github.com/centrifugal/centrifugal.dev/edit/main/${blogDirPath}/${blogPath}`;
},
/**
* Useful if you commit localized files to git.
* When markdown files are localized, the edit url will target the localized file,
* instead of the original unlocalized file.
* Note: this option is ignored when editUrl is a function
*/
editLocalizedFiles: false,
/**
* Blog page title for better SEO
*/
blogTitle: 'Centrifugal Blog',
/**
* Blog page meta description for better SEO
*/
blogDescription: 'Centrifugal Blog',
/**
* Number of blog post elements to show in the blog sidebar
* 'ALL' to show all blog posts
* 0 to disable
*/
blogSidebarCount: 0,
/**
* Title of the blog sidebar
*/
blogSidebarTitle: 'Recent posts',
/**
* URL route for the blog section of your site.
* *DO NOT* include a trailing slash.
*/
routeBasePath: 'blog',
include: ['*.md', '*.mdx'],
postsPerPage: 30,
/**
* Theme components used by the blog pages.
*/
blogListComponent: '@theme/BlogListPage',
blogPostComponent: '@theme/BlogPostPage',
blogTagsListComponent: '@theme/BlogTagsListPage',
blogTagsPostsComponent: '@theme/BlogTagsPostsPage',
/**
* Remark and Rehype plugins passed to MDX.
*/
remarkPlugins: [
/* require('remark-math') */
],
rehypePlugins: [],
/**
* Custom Remark and Rehype plugins passed to MDX before
* the default Docusaurus Remark and Rehype plugins.
*/
beforeDefaultRemarkPlugins: [],
beforeDefaultRehypePlugins: [],
/**
* Truncate marker, can be a regex or string.
*/
truncateMarker: /<!--\s*(truncate)\s*-->/,
/**
* Show estimated reading time for the blog post.
*/
showReadingTime: true,
/**
* Blog feed.
* If feedOptions is undefined, no rss feed will be generated.
*/
feedOptions: {
limit: false,
type: 'all', // required. 'rss' | 'feed' | 'all'
title: '', // default to siteConfig.title
description: '', // default to `${siteConfig.title} Blog`
copyright: 'Centrifugal Labs LTD',
language: undefined, // possible values: http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
},
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
plugins: [],
stylesheets: [
'https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css'
]
};