Skip to content

Commit 139bad0

Browse files
committed
fix: resolve build_folders command errors
- clean up left over landingPage code
1 parent e5a3a0b commit 139bad0

File tree

2 files changed

+1
-102
lines changed

2 files changed

+1
-102
lines changed

gatsby-node.js

+1-13
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
6464
edges {
6565
node {
6666
frontmatter {
67-
type
67+
subject
6868
}
6969
fields {
7070
fileRelativePath
@@ -82,7 +82,6 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
8282
slug
8383
}
8484
frontmatter {
85-
type
8685
subject
8786
}
8887
}
@@ -99,7 +98,6 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
9998
slug
10099
}
101100
frontmatter {
102-
type
103101
subject
104102
translationType
105103
}
@@ -454,23 +452,13 @@ const createPageFromNode = (
454452
}
455453
};
456454

457-
const TEMPLATES_BY_TYPE = {
458-
landingPage: 'landingPage',
459-
apiDoc: 'docPage',
460-
releaseNote: 'releaseNote',
461-
troubleshooting: 'docPage',
462-
};
463-
464455
const getTemplate = (node) => {
465456
const {
466457
frontmatter,
467458
fields: { fileRelativePath },
468459
} = node;
469460

470461
switch (true) {
471-
case Boolean(frontmatter.type):
472-
return { template: TEMPLATES_BY_TYPE[frontmatter.type] };
473-
474462
case /docs\/release-notes\/.*\/index.mdx$/.test(fileRelativePath):
475463
return {
476464
template: 'releaseNoteLandingPage',

src/templates/landingPage.js

-89
This file was deleted.

0 commit comments

Comments
 (0)