Skip to content

Commit bbed9b6

Browse files
committed
Sync config files from source-repo
1 parent 667e97b commit bbed9b6

File tree

3 files changed

+4308
-3166
lines changed

3 files changed

+4308
-3166
lines changed

docusaurus.config.js

Lines changed: 159 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,183 +1,201 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
3-
43
// Change here to customise config
5-
64
// Name of the Github Repo, it's also the baseUrl
7-
const workshopName = 'intro-lab';
85
// Change this if hosting outside mongodb-developer
9-
const organizationName = "mongodb-developer";
10-
116
// Main page config
7+
// Main Page Features
8+
// UTM stuff
9+
// Footer links (probably no need to change them)
10+
///////////////////////////////////////////////////////////////////////////////
11+
// DON'T CHANGE ANYTHING BELOW UNLESS YOU KNOW WHAT YOU'RE DOING //
12+
///////////////////////////////////////////////////////////////////////////////
13+
/** @type {import('@docusaurus/types').Config} */
14+
/** @type {import('@docusaurus/preset-classic').Options} */
15+
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
16+
const workshopName = "intro-lab";
17+
const organizationName = "mongodb-developer";
1218
const title = "Intro Lab";
1319
const tagLine = "Set up your MongoDB cluster, import the sample data, and get started with MongoDB Atlas.";
1420
const startButtonTitle = "Come on in!";
15-
const favicon = "/img/favicon.svg"
21+
const favicon = "/img/favicon.svg";
22+
23+
const featureList = [{
24+
title: "Hands-On Experiences",
25+
illustration: "img/coding.png",
1626

17-
// Main Page Features
18-
const featureList = [
19-
{
20-
title: 'Hands-On Experiences',
21-
illustration: 'img/coding.png',
2227
description: `
2328
Learn by doing, not by reading.
24-
`,
25-
},
26-
{
27-
title: 'Amazing Instructors',
28-
illustration: 'img/highfive.png',
29+
`
30+
}, {
31+
title: "Amazing Instructors",
32+
illustration: "img/highfive.png",
33+
2934
description: `
3035
Build it with the help of our amazing instructors, or just do it on your own.
31-
`,
32-
},
33-
{
34-
title: 'Take-Home Material',
35-
illustration: 'img/writing.png',
36+
`
37+
}, {
38+
title: "Take-Home Material",
39+
illustration: "img/writing.png",
40+
3641
description: `
3742
Take home the material and keep learning.
38-
`,
39-
},
40-
];
41-
42-
// UTM stuff
43-
44-
const utmAdvocateName = 'project.phoenix';
45-
const utmWorkshopName = 'developer.day';
43+
`
44+
}];
4645

46+
const utmAdvocateName = "project.phoenix";
47+
const utmWorkshopName = "developer.day";
4748
const utmParams = `utm_campaign=devrel&utm_source=workshop&utm_medium=cta&utm_content=${utmWorkshopName}&utm_term=${utmAdvocateName}`;
4849

49-
// Footer links (probably no need to change them)
50-
51-
const footerLinks = [
52-
{
50+
const footerLinks = [{
5351
label: "Try MongoDB Atlas",
54-
href: `https://www.mongodb.com/try?${utmParams}`,
55-
},
56-
{
52+
href: `https://www.mongodb.com/try?${utmParams}`
53+
}, {
5754
label: "Forums",
58-
href: `https://www.mongodb.com/community/forums/${utmParams}`,
59-
},
60-
{
55+
href: `https://www.mongodb.com/community/forums/${utmParams}`
56+
}, {
6157
label: "Developer Center",
62-
href: `https://www.mongodb.com/developer/${utmParams}`,
63-
},
64-
{
58+
href: `https://www.mongodb.com/developer/${utmParams}`
59+
}, {
6560
label: "MongoDB University",
66-
href: `https://learn.mongodb.com/${utmParams}`,
67-
},
68-
{
61+
href: `https://learn.mongodb.com/${utmParams}`
62+
}, {
6963
href: `https://github.com/${organizationName}/${workshopName}`,
70-
label: "This lab in GitHub",
71-
},
72-
{
64+
label: "This lab in GitHub"
65+
}, {
7366
label: ${new Date().getFullYear()} MongoDB, Inc.`,
74-
href: "#",
75-
},
76-
];
67+
href: "#"
68+
}];
7769

78-
///////////////////////////////////////////////////////////////////////////////
79-
// DON'T CHANGE ANYTHING BELOW UNLESS YOU KNOW WHAT YOU'RE DOING //
80-
///////////////////////////////////////////////////////////////////////////////
70+
const {
71+
themes
72+
} = require("prism-react-renderer");
8173

82-
const { themes } = require("prism-react-renderer");
8374
const lightCodeTheme = themes.github;
8475
const darkCodeTheme = themes.dracula;
8576

86-
/** @type {import('@docusaurus/types').Config} */
8777
const config = {
88-
title: `${title}`,
89-
tagline: `${tagLine}`,
90-
url: `https://${workshopName}.github.io`,
91-
baseUrl: `/${workshopName}/`,
92-
projectName: `${organizationName}.github.io`,
93-
organizationName: `${organizationName}`,
94-
trailingSlash: false,
95-
onBrokenLinks: "throw",
96-
onBrokenMarkdownLinks: "warn",
97-
favicon: `${favicon}`,
98-
deploymentBranch: "gh-pages",
99-
staticDirectories: ["static"],
100-
i18n: {
101-
defaultLocale: "en",
102-
locales: ["en", "zh"],
103-
},
104-
customFields: {
105-
startButtonTitle: `${startButtonTitle}`,
106-
featureList: featureList,
107-
utmParams,
108-
},
109-
presets: [
110-
[
111-
"classic",
112-
/** @type {import('@docusaurus/preset-classic').Options} */
113-
({
78+
title: `${title}`,
79+
tagline: `${tagLine}`,
80+
url: `https://${workshopName}.github.io`,
81+
baseUrl: `/${workshopName}/`,
82+
projectName: `${organizationName}.github.io`,
83+
organizationName: `${organizationName}`,
84+
trailingSlash: false,
85+
onBrokenLinks: "throw",
86+
onBrokenMarkdownLinks: "warn",
87+
favicon: `${favicon}`,
88+
deploymentBranch: "gh-pages",
89+
staticDirectories: ["static"],
90+
91+
i18n: {
92+
defaultLocale: "en",
93+
locales: ["en", "zh"]
94+
},
95+
96+
customFields: {
97+
startButtonTitle: `${startButtonTitle}`,
98+
featureList: featureList,
99+
utmParams
100+
},
101+
102+
presets: [["classic", ({
114103
docs: {
115-
sidebarPath: require.resolve("./sidebars.js"),
116-
editUrl: `https://github.com/${organizationName}/${workshopName}/blob/main`,
104+
sidebarPath: require.resolve("./sidebars.js"),
105+
editUrl: `https://github.com/${organizationName}/${workshopName}/blob/main`
117106
},
107+
118108
theme: {
119-
customCss: require.resolve("./src/css/custom.css"),
109+
customCss: require.resolve("./src/css/custom.css")
120110
},
111+
121112
gtag: {
122-
trackingID: "G-ZJ28V71VTQ",
123-
anonymizeIP: true,
113+
trackingID: "G-ZJ28V71VTQ",
114+
anonymizeIP: true
115+
}
116+
})]],
117+
118+
plugins: [require.resolve("docusaurus-lunr-search")],
119+
120+
themeConfig: ({
121+
docs: {
122+
sidebar: {
123+
autoCollapseCategories: true,
124+
hideable: true
125+
}
126+
},
127+
128+
announcementBar: undefined,
129+
130+
navbar: {
131+
title: `${title}`,
132+
133+
logo: {
134+
alt: "MongoDB Logo",
135+
src: "/img/logo.svg",
136+
srcDark: "/img/logo-dark.svg",
137+
className: "navbar-logo",
138+
width: "135px",
139+
height: "100%"
140+
},
141+
142+
items: [{
143+
label: "🤖 AI Lab Assistant",
144+
href: "https://mdb.link/lab-assistant",
145+
position: "right"
146+
}, {
147+
type: "localeDropdown",
148+
position: "right"
149+
}]
124150
},
125-
}),
126-
],
127-
],
128-
plugins: [require.resolve("docusaurus-lunr-search")],
129-
themeConfig:
130-
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
131-
({
132-
docs: {
133-
sidebar: {
134-
autoCollapseCategories: true,
135-
hideable: true,
151+
152+
footer: {
153+
style: "dark",
154+
links: footerLinks
136155
},
137-
},
138-
announcementBar: undefined,
139-
navbar: {
140-
title: `${title}`,
141-
logo: {
142-
alt: "MongoDB Logo",
143-
src: "/img/logo.svg",
144-
srcDark: "/img/logo-dark.svg",
145-
className: "navbar-logo",
146-
width: "135px",
147-
height: "100%",
156+
157+
prism: {
158+
theme: lightCodeTheme,
159+
darkTheme: darkCodeTheme,
160+
additionalLanguages: ["powershell", "swift", "kotlin"]
148161
},
149-
items: [
150-
{
151-
label: "🤖 AI Lab Assistant",
152-
href: "https://mdb.link/lab-assistant",
153-
position: "right",
154-
},
155-
{
156-
type: "localeDropdown",
157-
position: "right",
158-
},
159-
],
160-
},
161-
footer: {
162-
style: "dark",
163-
links: footerLinks,
164-
},
165-
prism: {
166-
theme: lightCodeTheme,
167-
darkTheme: darkCodeTheme,
168-
additionalLanguages: ["powershell", "swift", "kotlin"],
169-
},
170-
mermaid: {
171-
theme: { light: "neutral", dark: "forest" },
172-
},
162+
163+
mermaid: {
164+
theme: {
165+
light: "neutral",
166+
dark: "forest"
167+
}
168+
}
173169
}),
174-
future: {
175-
experimental_faster: true,
176-
},
177-
markdown: {
178-
mermaid: true,
179-
},
180-
themes: ["@docusaurus/theme-mermaid"],
170+
171+
future: {
172+
v4: {
173+
removeLegacyPostBuildHeadAttribute: true,
174+
useCssCascadeLayers: true
175+
},
176+
177+
experimental_faster: {
178+
swcJsLoader: true,
179+
swcJsMinimizer: true,
180+
swcHtmlMinimizer: true,
181+
lightningCssMinimizer: true,
182+
rspackBundler: true,
183+
rspackPersistentCache: true,
184+
ssgWorkerThreads: true,
185+
mdxCrossCompilerCache: true
186+
},
187+
188+
experimental_storage: {
189+
type: "localStorage",
190+
namespace: true
191+
}
192+
},
193+
194+
markdown: {
195+
mermaid: true
196+
},
197+
198+
themes: ["@docusaurus/theme-mermaid"]
181199
};
182200

183-
module.exports = config;
201+
module.exports = config;

0 commit comments

Comments
 (0)