forked from serverpod/serverpod_docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
140 lines (135 loc) · 3.73 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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
import { themes } from 'prism-react-renderer';
const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Serverpod',
tagline: 'The missing server for Flutter',
url: 'https://serverpod.github.io',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.png',
organizationName: 'serverpod', // Usually your GitHub org/user name.
projectName: 'serverpod.github.io', // Usually your repo name.
trailingSlash: false,
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl: 'https://github.com/serverpod/serverpod_docs/tree/main/',
breadcrumbs: false,
},
blog: false,
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
colorMode: {
respectPrefersColorScheme: true,
disableSwitch: false,
},
navbar: {
// title: 'My Site',
logo: {
alt: 'Serverpod Logo',
src: 'img/logo-horizontal.svg',
srcDark: 'img/logo-horizontal-dark.svg',
href: 'https://serverpod.dev',
},
items: [{
type: 'docsVersionDropdown',
position: 'left',
},
{
href: 'https://pub.dev/documentation/serverpod/latest/',
label: 'API reference',
position: 'right',
},
{
href: 'https://careers.serverpod.dev/',
label: 'Career',
position: 'right',
},
{
href: 'https://twitter.com/ServerpodDev',
label: 'Twitter',
position: 'right',
},
{
href: 'https://github.com/serverpod/serverpod',
label: 'GitHub',
position: 'right',
},
{
type: 'search',
position: 'right',
},
],
},
footer: {
style: 'dark',
copyright: `Copyright © ${new Date().getFullYear()} Serverpod authors.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['dart', 'bash'],
},
}),
scripts: [{
src: "https://widget.kapa.ai/kapa-widget.bundle.js",
"data-website-id": "9ae02024-c2cf-4f58-b2d9-7ca3961dc1ef",
"data-project-name": "Serverpod",
"data-project-color": "#020F24",
"data-project-logo": "https://avatars.githubusercontent.com/u/48181558?s=200&v=4",
async: true,
}],
plugins: [
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
// Moved in version 1.1.1
from: ['/concepts/authentication'],
to: '/concepts/authentication/setup',
},
{
// Moved in version 1.1.1 and 2.1.0
from: ['/tutorials', '/tutorials/videos'],
to: '/tutorials/first-app',
},
{
// Moved in version 1.2.0
from: ['/concepts/database-communication'],
to: '/concepts/database/connection',
},
{
// Moved in version 2.1.0
from: ['/insights'],
to: '/tools/insights',
},
{
// Moved in version 2.1.0
from: ['/roadmap'],
to: '/contribute',
}
]
}
]
]
};
module.exports = config;