forked from reduxjs/redux-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
182 lines (181 loc) · 5.03 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
// site configuration options.
const { resolve } = require('path')
const {
linkDocblocks,
transpileCodeblocks,
} = require('remark-typescript-tools')
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
path: '../docs',
sidebarPath: require.resolve('./sidebars.json'),
showLastUpdateTime: true,
routeBasePath: '/',
include: [
'{api,assets,introduction,migrations,rtk-query,tutorials,usage}/**/*.{md,mdx}',
], // no other way to exclude node_modules
remarkPlugins: [
[
linkDocblocks,
{
extractorSettings: {
tsconfig: resolve(__dirname, '../docs/tsconfig.json'),
basedir: resolve(__dirname, '../packages/toolkit/src'),
rootFiles: [
'index.ts',
'query/index.ts',
'query/createApi.ts',
'query/react/index.ts',
'query/react/ApiProvider.tsx',
],
},
},
],
[
transpileCodeblocks,
{
compilerSettings: {
tsconfig: resolve(__dirname, '../docs/tsconfig.json'),
externalResolutions: {},
},
},
],
],
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
projectName: 'redux-toolkit',
baseUrl: '/',
favicon: 'img/favicon/favicon.ico',
tagline:
'The official, opinionated, batteries-included toolset for efficient Redux development',
title: 'Redux Toolkit',
url: 'https://redux-toolkit.js.org',
customFields: {
repoUrl: 'https://github.com/reduxjs/redux-toolkit',
},
themeConfig: {
metadata: [{ name: 'twitter:card', content: 'summary' }],
prism: {
theme: require('./src/js/monokaiTheme.js'),
},
image: 'img/redux-logo-landscape.png',
colorMode: {
respectPrefersColorScheme: true,
},
navbar: {
title: 'Redux Toolkit',
logo: {
alt: 'Redux Logo',
src: 'img/redux.svg',
},
items: [
{
to: 'introduction/getting-started',
label: 'Getting Started',
position: 'right',
},
{ to: 'tutorials/overview', label: 'Tutorials', position: 'right' },
{ to: 'usage/usage-guide', label: 'Usage Guide', position: 'right' },
{ to: 'api/configureStore', label: 'API', position: 'right' },
{ to: 'rtk-query/overview', label: 'RTK Query', position: 'right' },
{
href: 'https://github.com/reduxjs/redux-toolkit',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
logo: {
alt: 'Redux Logo',
src: 'img/redux_white.svg',
},
links: [
{
title: 'Docs',
items: [
{
label: 'Getting Started',
to: 'introduction/getting-started',
},
{
label: 'Tutorials',
to: 'tutorials/overview',
},
{
label: 'Usage Guide',
to: 'usage/usage-guide',
},
{
label: 'API Reference',
to: 'api/configureStore',
},
{ to: 'rtk-query/overview', label: 'RTK Query' },
],
},
{
title: 'Community',
items: [
{
label: 'Stack Overflow',
href: 'http://stackoverflow.com/questions/tagged/redux',
},
{
label: 'Discord',
href: 'https://discord.gg/0ZcbPKXt5bZ6au5t',
},
],
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://www.github.com/reduxjs/redux-toolkit',
},
{
html: `
<a href="https://www.netlify.com">
<img
src="https://www.netlify.com/img/global/badges/netlify-light.svg"
alt="Deploys by Netlify"
/>
</a>
`,
},
],
},
],
copyright: `Copyright © 2015–${new Date().getFullYear()} Dan Abramov and the Redux documentation authors.`,
},
algolia: {
appId: 'CK59DFV0FC',
apiKey: '98e886dfbcde7f7e8ec8d7ff1c2c34c8',
indexName: 'redux-starter-kit',
algoliaOptions: {},
},
},
plugins: [
[
'@dipakparmar/docusaurus-plugin-umami',
/** @type {import('@dipakparmar/docusaurus-plugin-umami').Options} */
({
websiteID: '616c102e-05dd-4a74-b63e-01bb52f1bc6c',
analyticsDomain: 'redux-docs-umami.up.railway.app',
scriptName: 'script.js',
dataAutoTrack: true,
dataDoNotTrack: true,
dataCache: true,
}),
],
],
}