1
1
// @ts -check
2
2
// Note: type annotations allow type checking and IDEs autocompletion
3
-
4
3
// Change here to customise config
5
-
6
4
// Name of the Github Repo, it's also teh baseUrl
7
- const workshopName = 'aggregation-pipeline-lab' ;
8
5
// Change this if hosting outside mongodb-developer
9
- const organizationName = "mongodb-developer" ;
10
-
11
6
// 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
+ // announcementBar: {
17
+ // id: "feedback_form",
18
+ // content:
19
+ // 'We are looking to revamp our docs, please fill <a target="_blank" rel="noopener noreferrer" href="#">this survey</a>',
20
+ // backgroundColor: "#fafbfc",
21
+ // textColor: "#091E42",
22
+ // isCloseable: true,
23
+ // },
24
+ const workshopName = "aggregation-pipeline-lab" ;
25
+ const organizationName = "mongodb-developer" ;
12
26
const title = "Simplify Data Processing" ;
13
27
const tagLine = "With the MongoDB Aggregation Framework" ;
14
28
const startButtonTitle = "Start Lab" ;
15
- const favicon = "img/favicon.svg"
29
+ const favicon = "img/favicon.svg" ;
30
+
31
+ const featureList = [ {
32
+ title : "Learn to write aggregation pipelines!" ,
33
+ illustration : "img/writing.png" ,
16
34
17
- // Main Page Features
18
- const featureList = [
19
- {
20
- title : 'Learn to write aggregation pipelines!' ,
21
- illustration : 'img/writing.png' ,
22
35
description : `
23
36
Writing Aggregation Pipelines!
24
- ` ,
25
- } ,
26
- {
27
- title : 'Compose pipeline stages' ,
28
- illustration : 'img/coding.png' ,
37
+ `
38
+ } , {
39
+ title : "Compose pipeline stages" ,
40
+ illustration : "img/coding.png" ,
41
+
29
42
description : `
30
43
Unleash the power of the MongoDB Aggregation Pipeline!
31
- ` ,
32
- } ,
33
- {
34
- title : 'Get hands-on experience and sample code' ,
35
- illustration : 'img/highfive.png' ,
44
+ `
45
+ } , {
46
+ title : "Get hands-on experience and sample code" ,
47
+ illustration : "img/highfive.png" ,
48
+
36
49
description : `
37
50
Learn by doing and build your Apps faster!
38
- ` ,
39
- } ,
40
- ] ;
41
-
42
- // UTM stuff
51
+ `
52
+ } ] ;
43
53
44
54
const utmAdvocateName = `diego.freniche` ;
45
- const utmWorkshopName = 'docusaurus_workshop'
46
-
55
+ const utmWorkshopName = "docusaurus_workshop" ;
47
56
const utmParams = `utm_campaign=devrel&utm_source=workshop&utm_medium=cta&utm_content=${ utmWorkshopName } &utm_term=${ utmAdvocateName } ` ;
48
57
49
- // Footer links (probably no need to change them)
50
-
51
- const footerLinks = [
52
- {
58
+ const footerLinks = [ {
53
59
label : "Try MongoDB Atlas" ,
54
- href : `https://www.mongodb.com/try?${ utmParams } ` ,
55
- } ,
56
- {
60
+ href : `https://www.mongodb.com/try?${ utmParams } `
61
+ } , {
57
62
label : "Forums" ,
58
- href : `https://www.mongodb.com/community/forums/${ utmParams } ` ,
59
- } ,
60
- {
63
+ href : `https://www.mongodb.com/community/forums/${ utmParams } `
64
+ } , {
61
65
label : "Developer Center" ,
62
- href : `https://www.mongodb.com/developer/${ utmParams } ` ,
63
- } ,
64
- {
66
+ href : `https://www.mongodb.com/developer/${ utmParams } `
67
+ } , {
65
68
label : "MongoDB University" ,
66
- href : `https://learn.mongodb.com/${ utmParams } ` ,
67
- } ,
68
- {
69
+ href : `https://learn.mongodb.com/${ utmParams } `
70
+ } , {
69
71
href : `https://github.com/${ organizationName } /${ workshopName } ` ,
70
- label : "This lab in GitHub" ,
71
- } ,
72
- {
72
+ label : "This lab in GitHub"
73
+ } , {
73
74
label : `© ${ new Date ( ) . getFullYear ( ) } MongoDB, Inc.` ,
74
- href : "#" ,
75
- } ,
76
- ] ;
75
+ href : "#"
76
+ } ] ;
77
77
78
- ///////////////////////////////////////////////////////////////////////////////
79
- // DON'T CHANGE ANYTHING BELOW UNLESS YOU KNOW WHAT YOU'RE DOING //
80
- ///////////////////////////////////////////////////////////////////////////////
78
+ const {
79
+ themes
80
+ } = require ( "prism-react-renderer" ) ;
81
81
82
- const { themes } = require ( "prism-react-renderer" ) ;
83
82
const lightCodeTheme = themes . github ;
84
83
const darkCodeTheme = themes . dracula ;
85
84
86
- /** @type {import('@docusaurus/types').Config } */
87
85
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
- } ,
108
- presets : [
109
- [
110
- "classic" ,
111
- /** @type {import('@docusaurus/preset-classic').Options } */
112
- ( {
86
+ title : `${ title } ` ,
87
+ tagline : `${ tagLine } ` ,
88
+ url : `https://${ workshopName } .github.io` ,
89
+ baseUrl : `/${ workshopName } /` ,
90
+ projectName : `${ organizationName } .github.io` ,
91
+ organizationName : `${ organizationName } ` ,
92
+ trailingSlash : false ,
93
+ onBrokenLinks : "throw" ,
94
+ onBrokenMarkdownLinks : "warn" ,
95
+ favicon : `${ favicon } ` ,
96
+ deploymentBranch : "gh-pages" ,
97
+ staticDirectories : [ "static" ] ,
98
+
99
+ i18n : {
100
+ defaultLocale : "en" ,
101
+ locales : [ "en" , "zh" ]
102
+ } ,
103
+
104
+ customFields : {
105
+ startButtonTitle : `${ startButtonTitle } ` ,
106
+ featureList : featureList
107
+ } ,
108
+
109
+ presets : [ [ "classic" , ( {
113
110
docs : {
114
- sidebarPath : require . resolve ( "./sidebars.js" ) ,
115
- editUrl : `https://github.com/${ organizationName } /${ workshopName } /blob/main` ,
111
+ sidebarPath : require . resolve ( "./sidebars.js" ) ,
112
+ editUrl : `https://github.com/${ organizationName } /${ workshopName } /blob/main`
116
113
} ,
114
+
117
115
theme : {
118
- customCss : require . resolve ( "./src/css/custom.css" ) ,
116
+ customCss : require . resolve ( "./src/css/custom.css" )
119
117
} ,
118
+
120
119
gtag : {
121
- trackingID : "G-ZJ28V71VTQ" ,
122
- anonymizeIP : true ,
120
+ trackingID : "G-ZJ28V71VTQ" ,
121
+ anonymizeIP : true
122
+ }
123
+ } ) ] ] ,
124
+
125
+ plugins : [ require . resolve ( "docusaurus-lunr-search" ) ] ,
126
+
127
+ themeConfig : ( {
128
+ docs : {
129
+ sidebar : {
130
+ autoCollapseCategories : true ,
131
+ hideable : true
132
+ }
123
133
} ,
124
- } ) ,
125
- ] ,
126
- ] ,
127
- plugins : [ require . resolve ( "docusaurus-lunr-search" ) ] ,
128
- themeConfig :
129
- /** @type {import('@docusaurus/preset-classic').ThemeConfig } */
130
- ( {
131
- docs : {
132
- sidebar : {
133
- autoCollapseCategories : true ,
134
- hideable : true ,
134
+
135
+ navbar : {
136
+ title : `${ title } ${ tagLine } ` ,
137
+
138
+ logo : {
139
+ alt : "MongoDB Logo" ,
140
+ src : "img/logo.svg" ,
141
+ srcDark : "img/logo-dark.svg" ,
142
+ className : "navbar-logo" ,
143
+ width : "135px" ,
144
+ height : "100%"
145
+ } ,
146
+
147
+ items : [ {
148
+ label : "🤖 AI Lab Assistant" ,
149
+ href : "https://mdb.link/lab-assistant" ,
150
+ position : "right"
151
+ } , {
152
+ type : "localeDropdown" ,
153
+ position : "right"
154
+ } ]
135
155
} ,
136
- } ,
137
- // announcementBar: {
138
- // id: "feedback_form",
139
- // content:
140
- // 'We are looking to revamp our docs, please fill <a target="_blank" rel="noopener noreferrer" href="#">this survey</a>',
141
- // backgroundColor: "#fafbfc",
142
- // textColor: "#091E42",
143
- // isCloseable: true,
144
- // },
145
- navbar : {
146
- title : `${ title } ${ tagLine } ` ,
147
- logo : {
148
- alt : "MongoDB Logo" ,
149
- src : "img/logo.svg" ,
150
- srcDark : "img/logo-dark.svg" ,
151
- className : "navbar-logo" ,
152
- width : "135px" ,
153
- height : "100%" ,
156
+
157
+ footer : {
158
+ style : "dark" ,
159
+ links : footerLinks
160
+ } ,
161
+
162
+ prism : {
163
+ theme : lightCodeTheme ,
164
+ darkTheme : darkCodeTheme ,
165
+ additionalLanguages : [ "powershell" , "swift" , "kotlin" ]
154
166
} ,
155
- items : [
156
- {
157
- label : "🤖 AI Lab Assistant" ,
158
- href : "https://mdb.link/lab-assistant" ,
159
- position : "right" ,
160
- } ,
161
- {
162
- type : "localeDropdown" ,
163
- position : "right" ,
164
- } ,
165
- ] ,
166
- } ,
167
- footer : {
168
- style : "dark" ,
169
- links : footerLinks ,
170
- } ,
171
- prism : {
172
- theme : lightCodeTheme ,
173
- darkTheme : darkCodeTheme ,
174
- additionalLanguages : [ "powershell" , "swift" , "kotlin" ] ,
175
- } ,
176
- mermaid : {
177
- theme : { light : "neutral" , dark : "forest" } ,
178
- } ,
167
+
168
+ mermaid : {
169
+ theme : {
170
+ light : "neutral" ,
171
+ dark : "forest"
172
+ }
173
+ }
179
174
} ) ,
180
- future : {
181
- experimental_faster : true ,
182
- } ,
183
- markdown : {
184
- mermaid : true ,
185
- } ,
186
- themes : [ "@docusaurus/theme-mermaid" ] ,
175
+
176
+ future : {
177
+ v4 : {
178
+ removeLegacyPostBuildHeadAttribute : true ,
179
+ useCssCascadeLayers : true
180
+ } ,
181
+
182
+ experimental_faster : {
183
+ swcJsLoader : true ,
184
+ swcJsMinimizer : true ,
185
+ swcHtmlMinimizer : true ,
186
+ lightningCssMinimizer : true ,
187
+ rspackBundler : true ,
188
+ rspackPersistentCache : true ,
189
+ ssgWorkerThreads : true ,
190
+ mdxCrossCompilerCache : true
191
+ } ,
192
+
193
+ experimental_storage : {
194
+ type : "localStorage" ,
195
+ namespace : true
196
+ }
197
+ } ,
198
+
199
+ markdown : {
200
+ mermaid : true
201
+ } ,
202
+
203
+ themes : [ "@docusaurus/theme-mermaid" ]
187
204
} ;
188
205
189
- module . exports = config ;
206
+ module . exports = config ;
0 commit comments