Skip to content

Commit c36f147

Browse files
committed
Revert "fix full width cta slice"
This reverts commit 4c0d39b. Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
1 parent 376eedc commit c36f147

1 file changed

Lines changed: 5 additions & 23 deletions

File tree

gatsby-node.js

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ if (process.env.CI === "true") {
3636
if (page.path !== oldPage.path) {
3737
// Replace new page with old page
3838
deletePage(oldPage);
39-
page.slices = { ...DEFAULT_SLICES, ...(page.slices || {}) };
4039
createPage(page);
4140

4241
createRedirect({
@@ -52,14 +51,6 @@ if (process.env.CI === "true") {
5251

5352
const { loadRedirects } = require("./src/utils/redirects.js");
5453

55-
const DEFAULT_SLICES = {
56-
"site-header": "site-header",
57-
"site-footer": "site-footer",
58-
"cta-bottom": "cta-bottom",
59-
"cta-fullwidth": "cta-fullwidth",
60-
"cta-imageonly": "cta-imageonly",
61-
};
62-
6354
exports.createPages = async ({ actions, graphql, reporter }) => {
6455
const { createRedirect, createSlice } = actions;
6556
const redirects = loadRedirects();
@@ -93,17 +84,8 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
9384
});
9485

9586
const envCreatePage = (props) => {
96-
const pageConfig = { ...props };
97-
98-
if (isDevelopment) {
99-
pageConfig.defer = true;
100-
} else if (isProduction) {
101-
pageConfig.mode = "SSR";
102-
}
103-
pageConfig.slices = { ...DEFAULT_SLICES, ...(pageConfig.slices || {}) };
104-
10587
if (process.env.CI === "true") {
106-
const { path, matchPath, ...rest } = pageConfig;
88+
const { path, matchPath, ...rest } = props;
10789

10890
createRedirect({
10991
fromPath: `/${path}/`,
@@ -118,7 +100,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
118100
...rest,
119101
});
120102
}
121-
return createPage(pageConfig);
103+
return createPage(props);
122104
};
123105

124106
const blogPostTemplate = path.resolve("src/templates/blog-single.js");
@@ -555,7 +537,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
555537
});
556538

557539
const components = componentsData.map((component) => component.src.replace("/", ""));
558-
const createComponentPages = (envCreatePage, components) => {
540+
const createComponentPages = (createPage, components) => {
559541
const pageTypes = [
560542
{ suffix: "", file: "index.js" },
561543
{ suffix: "/guidance", file: "guidance.js" },
@@ -568,7 +550,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
568550
const componentPath = `./src/sections/Projects/Sistent/components/${name}/${file}`;
569551
if (fs.existsSync(path.resolve(componentPath))) {
570552
try {
571-
envCreatePage({
553+
createPage({
572554
path: pagePath,
573555
component: require.resolve(componentPath),
574556
});
@@ -582,7 +564,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
582564
});
583565
};
584566

585-
createComponentPages(envCreatePage, components);
567+
createComponentPages(createPage, components);
586568
};
587569

588570
// slug starts and ends with '/' so parts[0] and parts[-1] will be empty

0 commit comments

Comments
 (0)