-
Notifications
You must be signed in to change notification settings - Fork 113
/
docusaurus.config.js
180 lines (177 loc) · 5.24 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
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'MyJavaScript',
tagline:
'Руководства, шпаргалки, вопросы и другие материалы по JavaScript, React, TypeScript, Node.js, Express, Prisma, GraphQL, Docker и множеству других технологий.',
url: 'https://my-js.org',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.png',
organizationName: 'harryheman', // Usually your GitHub org/user name.
projectName: 'my-js', // Usually your repo name.
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl: 'https://github.com/harryheman/my-js/tree/master/',
breadcrumbs: false,
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
plugins: [
[
'@docusaurus/plugin-pwa',
{
debug: true,
offlineModeActivationStrategies: [
'appInstalled',
'standalone',
'queryString',
],
pwaHead: [
{
tagName: 'link',
rel: 'icon',
href: '/img/logo.png',
},
{
tagName: 'link',
rel: 'manifest',
href: '/manifest.json',
},
{
tagName: 'meta',
name: 'theme-color',
content: '#3c3c3c',
},
{
tagName: 'meta',
name: 'apple-mobile-web-app-capable',
content: 'yes',
},
{
tagName: 'meta',
name: 'apple-mobile-web-app-status-bar-style',
content: '#3c3c3c',
},
{
tagName: 'link',
rel: 'apple-touch-icon',
href: '/img/logo.png',
},
{
tagName: 'link',
rel: 'mask-icon',
href: '/img/logo.png',
color: '#3c3c3c',
},
{
tagName: 'meta',
name: 'msapplication-TileImage',
content: '/img/logo.png',
},
{
tagName: 'meta',
name: 'msapplication-TileColor',
content: '#3c3c3c',
},
],
},
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: 'img/logo.png',
navbar: {
title: 'MyJavaScript',
logo: {
alt: 'MyJavaScript Logo',
src: 'img/logo.png',
},
items: [
{
type: 'doc',
docId: 'guide/intro-guide',
position: 'left',
label: 'Руководства',
},
{
type: 'doc',
docId: 'cheatsheet/intro-cheatsheet',
position: 'left',
label: 'Шпаргалки',
},
{
type: 'doc',
docId: 'other/intro-other',
position: 'left',
label: 'Другое',
},
{
type: 'doc',
docId: 'links/intro-links',
position: 'left',
label: 'Cсылки',
},
// Please keep GitHub link to the right for consistency.
{
href: 'https://github.com/harryheman/my-js',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Контакты',
items: [
{
html: '<p class="footer__link"><img src="/img/github.png" alt="" width="32" height="32"> <a href="https://github.com/harryheman" target="_blank">harryheman</a></p>',
},
{
html: '<p class="footer__link"><img src="/img/telegram.png" alt="" width="32" height="32"> @igoragapov</p>',
},
{
html: '<p class="footer__link"><img src="/img/email.png" alt="" width="32" height="32"><a href="mailto:[email protected]">[email protected]</a></p>',
},
{
label: 'Habr',
href: 'https://habr.com/ru/users/aio350',
},
],
},
],
// Please do not remove the credits, help to publicize Docusaurus :)
copyright: `
Copyright © ${new Date().getFullYear()}. MyJavaScript. <br />
Built by <a href="https://github.com/harryheman" target="_blank" rel="noopener noreferrer">Igor Agapov</a> with 🖤 & <a href="https://docusaurus.io/" target="_blank" rel="noopener noreferrer">Docusaurus</a>. <br />
Deploys on <a href="https://www.netlify.com/" target="_blank" rel="noopener noreferrer">Netlify</a>.
`,
},
docs: {
sidebar: {
hideable: true,
autoCollapseCategories: true,
},
},
algolia: {
appId: 'K9EMNI09N5',
apiKey: '415a654b5e8424ce6bb502e4d9689c4a',
indexName: 'my-js',
contextualSearch: true,
},
}),
}
module.exports = config