-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
182 lines (169 loc) · 5.95 KB
/
docusaurus.config.js
File metadata and controls
182 lines (169 loc) · 5.95 KB
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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const { themes } = require('prism-react-renderer');
const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Scratch Modding Tutorials',
tagline: 'Tutorial for modding Scratch 3.0 and 2.0',
//favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://mrcomputer1.github.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/scratch-modding/',
onBrokenLinks: 'throw',
onBrokenAnchors: 'throw',
trailingSlash: false,
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
future: {
experimental_faster: true,
v4: true,
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/Mrcomputer1/scratch-modding/tree/master/',
},
pages: {
editUrl: 'https://github.com/Mrcomputer1/scratch-modding/tree/master/'
},
blog: false,
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
plugins: [
[
'@docusaurus/plugin-client-redirects',
{
createRedirects(existingPath) {
if (existingPath.startsWith('/3.0/tutorial')) {
return existingPath.replace('/3.0/tutorial', '/tutorial');
} else if (existingPath.startsWith('/2.0/tutorial')) {
return existingPath.replace('/2.0/tutorial', '/tutorial-2.0');
}
return undefined;
}
}
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
//image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'Scratch Modding Tutorials',
/*logo: {
alt: 'Scratch 3.0 Modding Tutorial',
src: 'img/logo.svg',
},*/
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Tutorial (3.0)',
},
{
type: 'docSidebar',
sidebarId: 'tutorial2Sidebar',
position: 'left',
label: 'Tutorial (2.0)',
}
],
},
footer: {
style: 'dark',
links: [
{
title: "Community",
items: [
{
label: "Forum Topic",
href: "https://scratch.mit.edu/discuss/topic/703721/"
},
{
label: "Credits",
to: "/credits"
},
{
label: "GitHub",
href: "https://github.com/Mrcomputer1/scratch-modding"
}
]
},
{
title: "Modding Tutorials",
items: [
{
label: "3.0 Tutorial",
to: "/3.0/tutorial/getting-started/prerequisites"
},
{
label: "3.0 (BSD) Tutorial",
to: '/3.0-bsd/tutorial/getting-started/prerequisites'
},
{
label: "2.0 Tutorial",
to: "/2.0/tutorial/getting-started/prerequisites"
}
]
},
{
title: "Mrcomputer1",
items: [
{
label: "Scratch",
href: "https://scratch.mit.edu/users/Mrcomputer1"
},
{
label: "GitHub",
href: "https://github.com/Mrcomputer1"
}
]
}
],
copyright: `Copyright © ${new Date().getFullYear()} Mrcomputer1 • <a href="/scratch-modding/license">License</a>`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ["bash", "batch", "json", "markup", "yaml", "groovy", "actionscript"]
},
announcementBar: {
id: 'scratch-editor-and-sprok',
backgroundColor: '#31542F', //'#855cd6',
textColor: '#fff',
content: 'The 3.0 tutorial has been updated to use the scratch-editor monorepo and the new version of scratch-blocks.',
isCloseable: true,
},
}),
markdown: {
mdx1Compat: {
comments: false,
admonitions: false,
headingIds: true
},
hooks: {
onBrokenMarkdownLinks: 'warn',
onBrokenMarkdownImages: 'warn',
},
}
};
module.exports = config;