-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocusaurus.config.js
161 lines (160 loc) · 3.86 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
// const lightCodeTheme = require('prism-react-renderer/themes/github')
// const darkCodeTheme = require('prism-react-renderer/themes/dracula')
module.exports = {
title: 'Swetrix Docs',
tagline: 'Ultimate open-source analytics to satisfy all your needs',
url: 'https://docs.swetrix.com',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
favicon: 'img/favicon.ico',
organizationName: 'swetrix', // github org name
projectName: 'docs', // github repo name
trailingSlash: false,
scripts: [
{
src: 'https://swetrix.org/swetrix.js', defer: true,
},
{
src: 'js/setupswetrix.js', defer: true,
}
],
themeConfig: {
colorMode: {
respectPrefersColorScheme: true,
},
navbar: {
hideOnScroll: true,
logo: {
alt: 'Swetrix',
src: 'img/logo_blue.png',
srcDark: 'img/logo_white.png',
href: 'https://swetrix.com',
target: '_blank',
style: {
height: '28px',
}
},
items: [
{
href: '/',
label: 'Docs',
position: 'left',
target: '_self',
activeBasePath: '/',
},
{
href: 'https://github.com/Swetrix',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub organisation',
},
// {
// type: "localeDropdown",
// position: "left"
// }
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Introduction',
to: '/',
},
],
},
{
title: 'Community',
items: [
{
label: 'Twitter',
href: 'https://twitter.com/swetrix',
},
{
label: 'Discord',
href: 'https://discord.gg/ZVK8Tw2E8j',
},
],
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/swetrix',
},
{
label: 'Email',
href: 'mailto:[email protected]',
},
],
},
],
copyright: `Copyright © 2021-${new Date().getFullYear()} Swetrix. Built with Docusaurus.`,
},
algolia: {
appId: 'O1G1A8JI1K',
apiKey: '4571f2913147bee4d59f82805c995d52',
indexName: 'swetrix',
},
prism: {
additionalLanguages: ['php'],
// theme: lightCodeTheme,
// darkTheme: darkCodeTheme,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/swetrix/docs/edit/main/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
stylesheets: [
{
href: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css',
integrity:
'sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc',
crossorigin: 'anonymous',
},
],
// plugins: [
// async function myPlugin(context, options) {
// return {
// name: "docusaurus-tailwindcss",
// configurePostCss(postcssOptions) {
// postcssOptions.plugins.push(require("tailwindcss"));
// postcssOptions.plugins.push(require("autoprefixer"));
// return postcssOptions;
// },
// };
// },
// ],
// i18n: {
// defaultLocale: 'en',
// locales: ['en', 'cn', 'ru'],
// localeConfigs: {
// en: {
// label: 'English',
// },
// cn: {
// label: '中文',
// },
// ru: {
// label: 'Русский',
// },
// }
// },
};