forked from Pycord-Development/guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
119 lines (115 loc) · 3.25 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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
// @ts-ignore
const lightCodeTheme = require("prism-react-renderer").themes.vsLight;
// @ts-ignore
const darkCodeTheme = require("prism-react-renderer").themes.vsDark;
const DefaultLocale = 'en';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Pycord Guide",
tagline:
"Imagine a place where you can learn how to create a Discord Bot",
url: "https://guide.pycord.dev",
trailingSlash: false,
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
organizationName: "Pycord-Development", // Usually your GitHub org/user name.
projectName: "guide", // Usually your repo name.
plugins: ["docusaurus-plugin-sass"],
presets: [
[
"classic",
{
docs: {
// @ts-ignore
editUrl: ({locale, versionDocsDirPath, docPath}) => {
// Link to Crowdin for French docs
if (locale !== DefaultLocale) {
return `https://translations.pycord.dev/guide/${locale}`;
}
// Link to GitHub for English docs
return `https://github.com/Pycord-Development/guide/edit/main/${versionDocsDirPath}/${docPath}`;
},
routeBasePath: "/",
showLastUpdateAuthor: true,
showLastUpdateTime: true,
},
theme: {
customCss: require.resolve("./src/scss/main.scss"),
},
},
],
],
i18n: {
defaultLocale: 'en',
locales: ['en', 'de', 'ja', 'fr', 'it', 'hi', 'ko', 'pt-BR', 'es-ES', 'zh-CN', 'ru'],
},
themeConfig: {
docs: {
sidebar: {
autoCollapseCategories: true,
},
},
colorMode: {
defaultMode: "dark",
disableSwitch: true, // TODO: Support light mode (I know, I know. Eww. I'm sorry.)
},
navbar: {
title: "Pycord Guide",
hideOnScroll: true,
items: [
{
label: "Home",
position: "left",
href: "https://pycord.dev/",
},
{
label: "Docs",
position: "left",
href: "https://docs.pycord.dev",
},
{
label: "GitHub",
position: "left",
href: "https://pycord.dev/github",
},
// TODO: Post v2.0: Version the docs
// {
// type: 'docsVersionDropdown',
// position: 'right',
// },
// TODO: Locales
{
type: 'localeDropdown',
position: 'right',
},
{
label: "Source",
// We should use href instead of to, but it creates a strange styling issue
to: 'https://github.com/Pycord-Development/guide',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub repository',
},
],
},
footer: {
style: "dark",
copyright: `Copyright © ${new Date().getFullYear()} Pycord Development, All rights reserved.`,
},
prism: {
defaultLanguage: "python",
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
algolia: {
appId: "B3W8ZM9HW4",
apiKey: "1bf03e7f2ea8fef3ab0c70f50c65e063", // Public key
indexName: "pycord",
}
},
};
module.exports = config;