@@ -117,6 +117,9 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
117117 collection
118118 slug
119119 }
120+ internal {
121+ contentFilePath
122+ }
120123 }
121124 }
122125 blogTags: allMdx(
@@ -160,6 +163,9 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
160163 slug
161164 collection
162165 }
166+ internal {
167+ contentFilePath
168+ }
163169 }
164170 }
165171 singleWorkshop: allMdx(
@@ -170,6 +176,9 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
170176 slug
171177 collection
172178 }
179+ internal {
180+ contentFilePath
181+ }
173182 }
174183 }
175184 labs: allMdx(
@@ -180,6 +189,9 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
180189 slug
181190 collection
182191 }
192+ internal {
193+ contentFilePath
194+ }
183195 }
184196 }
185197 learncontent: allMdx(
@@ -195,6 +207,9 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
195207 pageType
196208 collection
197209 }
210+ internal {
211+ contentFilePath
212+ }
198213 }
199214 }
200215 }
@@ -252,7 +267,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
252267 blogs . forEach ( ( blog ) => {
253268 envCreatePage ( {
254269 path : blog . fields . slug ,
255- component : blogPostTemplate ,
270+ component : ` ${ blogPostTemplate } ?__contentFilePath= ${ blog . internal . contentFilePath } ` ,
256271 context : {
257272 slug : blog . fields . slug ,
258273 } ,
@@ -284,7 +299,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
284299 resources . forEach ( ( resource ) => {
285300 envCreatePage ( {
286301 path : resource . fields . slug ,
287- component : resourcePostTemplate ,
302+ component : ` ${ resourcePostTemplate } ?__contentFilePath= ${ resource . internal . contentFilePath } ` ,
288303 context : {
289304 slug : resource . fields . slug ,
290305 } ,
@@ -294,7 +309,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
294309 news . forEach ( ( singleNews ) => {
295310 envCreatePage ( {
296311 path : singleNews . fields . slug ,
297- component : NewsPostTemplate ,
312+ component : ` ${ NewsPostTemplate } ?__contentFilePath= ${ singleNews . internal . contentFilePath } ` ,
298313 context : {
299314 slug : singleNews . fields . slug ,
300315 } ,
@@ -304,7 +319,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
304319 books . forEach ( ( book ) => {
305320 envCreatePage ( {
306321 path : book . fields . slug ,
307- component : BookPostTemplate ,
322+ component : ` ${ BookPostTemplate } ?__contentFilePath= ${ book . internal . contentFilePath } ` ,
308323 context : {
309324 slug : book . fields . slug ,
310325 } ,
@@ -314,7 +329,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
314329 events . forEach ( ( event ) => {
315330 envCreatePage ( {
316331 path : event . fields . slug ,
317- component : EventTemplate ,
332+ component : ` ${ EventTemplate } ?__contentFilePath= ${ event . internal . contentFilePath } ` ,
318333 context : {
319334 slug : event . fields . slug ,
320335 } ,
@@ -324,7 +339,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
324339 programs . forEach ( ( program ) => {
325340 envCreatePage ( {
326341 path : program . fields . slug ,
327- component : ProgramPostTemplate ,
342+ component : ` ${ ProgramPostTemplate } ?__contentFilePath= ${ program . internal . contentFilePath } ` ,
328343 context : {
329344 slug : program . fields . slug ,
330345 } ,
@@ -334,7 +349,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
334349 careers . forEach ( ( career ) => {
335350 envCreatePage ( {
336351 path : career . fields . slug ,
337- component : CareerPostTemplate ,
352+ component : ` ${ CareerPostTemplate } ?__contentFilePath= ${ career . internal . contentFilePath } ` ,
338353 context : {
339354 slug : career . fields . slug ,
340355 } ,
@@ -344,7 +359,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
344359 members . forEach ( ( member ) => {
345360 envCreatePage ( {
346361 path : member . fields . slug ,
347- component : MemberTemplate ,
362+ component : ` ${ MemberTemplate } ?__contentFilePath= ${ member . internal . contentFilePath } ` ,
348363 context : {
349364 slug : member . fields . slug ,
350365 } ,
@@ -355,7 +370,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
355370 MemberBio . forEach ( ( memberbio ) => {
356371 envCreatePage ( {
357372 path : `${ memberbio . fields . slug } /bio` ,
358- component : MemberBioTemplate ,
373+ component : ` ${ MemberBioTemplate } ?__contentFilePath= ${ memberbio . internal . contentFilePath } ` ,
359374 context : {
360375 member : memberbio . frontmatter . name ,
361376 } ,
@@ -365,7 +380,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
365380 singleWorkshop . forEach ( ( workshop ) => {
366381 envCreatePage ( {
367382 path : workshop . fields . slug ,
368- component : WorkshopTemplate ,
383+ component : ` ${ WorkshopTemplate } ?__contentFilePath= ${ workshop . internal . contentFilePath } ` ,
369384 context : {
370385 slug : workshop . fields . slug ,
371386 } ,
@@ -375,7 +390,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
375390 labs . forEach ( ( lab ) => {
376391 envCreatePage ( {
377392 path : lab . fields . slug ,
378- component : LabTemplate ,
393+ component : ` ${ LabTemplate } ?__contentFilePath= ${ lab . internal . contentFilePath } ` ,
379394 context : {
380395 slug : lab . fields . slug ,
381396 } ,
@@ -385,31 +400,22 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
385400 integrations . forEach ( ( integration ) => {
386401 envCreatePage ( {
387402 path : `/cloud-native-management/meshery${ integration . fields . slug } ` ,
388- component : integrationTemplate ,
403+ component : ` ${ integrationTemplate } ?__contentFilePath= ${ integration . internal . contentFilePath } ` ,
389404 context : {
390405 slug : integration . fields . slug ,
391406 name : "_images/" + integration . fields . slug . split ( "/" ) [ 2 ] ,
392407 } ,
393408 } ) ;
394409 } ) ;
395410
396- let programsArray = [ ] ;
397411 programs . forEach ( ( program ) => {
398- if (
399- programsArray . indexOf ( program . frontmatter . program ) >= 0 &&
400- program . frontmatter . program === "Layer5"
401- ) {
402- return false ;
403- } else {
404- programsArray . push ( program . frontmatter . program ) ;
405- envCreatePage ( {
406- path : `/programs/${ program . frontmatter . programSlug } ` ,
407- component : MultiProgramPostTemplate ,
408- context : {
409- program : program . frontmatter . program ,
410- } ,
411- } ) ;
412- }
412+ envCreatePage ( {
413+ path : `/programs/${ program . frontmatter . programSlug } ` ,
414+ component : `${ MultiProgramPostTemplate } ?__contentFilePath=${ program . internal . contentFilePath } ` ,
415+ context : {
416+ program : program . frontmatter . program ,
417+ } ,
418+ } ) ;
413419 } ) ;
414420
415421 const learnNodes = res . data . learncontent . nodes ;
@@ -640,7 +646,7 @@ const createCoursesListPage = ({ envCreatePage, node }) => {
640646
641647 envCreatePage ( {
642648 path : `${ slug } ` ,
643- component : path . resolve ( "src/templates/courses-list.js" ) ,
649+ component : ` ${ path . resolve ( "src/templates/courses-list.js" ) } ?__contentFilePath= ${ node . internal . contentFilePath } ` ,
644650 context : {
645651 // Data passed to context is available in page queries as GraphQL variables.
646652 learnpath,
@@ -656,7 +662,7 @@ const createCourseOverviewPage = ({ envCreatePage, node }) => {
656662
657663 envCreatePage ( {
658664 path : `${ slug } ` ,
659- component : path . resolve ( "src/templates/course-overview.js" ) ,
665+ component : ` ${ path . resolve ( "src/templates/course-overview.js" ) } ?__contentFilePath= ${ node . internal . contentFilePath } ` ,
660666 context : {
661667 learnpath,
662668 section,
@@ -674,7 +680,7 @@ const createChapterPage = ({ envCreatePage, node }) => {
674680
675681 envCreatePage ( {
676682 path : `${ slug } ` ,
677- component : path . resolve ( "src/templates/learn-chapter.js" ) ,
683+ component : ` ${ path . resolve ( "src/templates/learn-chapter.js" ) } ?__contentFilePath= ${ node . internal . contentFilePath } ` ,
678684 context : {
679685 learnpath,
680686 slug,
@@ -692,7 +698,7 @@ const createSectionPage = ({ envCreatePage, node }) => {
692698
693699 envCreatePage ( {
694700 path : `${ slug } ` ,
695- component : path . resolve ( "src/sections/Learn-Layer5/Section/index.js" ) ,
701+ component : ` ${ path . resolve ( "src/sections/Learn-Layer5/Section/index.js" ) } ?__contentFilePath= ${ node . internal . contentFilePath } ` ,
696702 context : {
697703 learnpath,
698704 slug,
0 commit comments