1
1
// const componentWithMDXScope = require('gatsby-mdx/component-with-mdx-scope');
2
2
const {
3
3
getTutorialSlug,
4
- getTutorialOverviewSlug,
5
- } = require ( ' ./src/utils/getTutorialSlug.js' ) ;
4
+ getTutorialOverviewSlug
5
+ } = require ( " ./src/utils/getTutorialSlug.js" ) ;
6
6
7
7
exports . createPages = async ( { graphql, actions } ) => {
8
8
const { createPage } = actions ;
9
9
const TutorialLayout = require . resolve (
10
- `./src/components/templates/Tutorial.tsx` ,
10
+ `./src/components/templates/Tutorial.tsx`
11
11
) ;
12
12
13
13
const { data } = await graphql ( `
@@ -33,7 +33,7 @@ exports.createPages = async ({ graphql, actions }) => {
33
33
const tutorialPath = getTutorialSlug ( node . fileAbsolutePath ) ;
34
34
const overviewPageSlug = getTutorialOverviewSlug ( node . fileAbsolutePath ) ;
35
35
const overviewTemplate = require . resolve (
36
- ' ./src/components/templates/TutorialOverview.tsx' ,
36
+ " ./src/components/templates/TutorialOverview.tsx"
37
37
) ;
38
38
//TODO: find a better way to ID posts & overviews Also a better way to query for them
39
39
if ( node . frontmatter . tutorialTitle ) {
@@ -42,17 +42,17 @@ exports.createPages = async ({ graphql, actions }) => {
42
42
component : overviewTemplate ,
43
43
context : {
44
44
id : node . id ,
45
- folderRegex : `/(${ overviewPageSlug } )/` ,
46
- } ,
45
+ folderRegex : `/(${ overviewPageSlug } )/`
46
+ }
47
47
} ) ;
48
48
}
49
49
createPage ( {
50
50
path : tutorialPath ,
51
51
component : TutorialLayout , // node.fileAbsolutePath,
52
52
context : {
53
53
id : node . id ,
54
- folderRegex : `/(${ overviewPageSlug } )/` ,
55
- } ,
54
+ folderRegex : `/(${ overviewPageSlug } )/`
55
+ }
56
56
} ) ;
57
57
} ) ;
58
58
} ;
0 commit comments