gatsby-attainlabs-cms 1.0.38 → 1.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54,7 +54,7 @@ export const TrustPilotQuery = graphql `
54
54
  }
55
55
  }
56
56
  }
57
- allBlogs: allBlogs {
57
+ allBlogs: allAttainLabsCmsBlogs {
58
58
  edges {
59
59
  node {
60
60
  blocks {
@@ -84,7 +84,7 @@ export const TrustPilotQuery = graphql `
84
84
  }
85
85
  }
86
86
  }
87
- sliderBlogs: allBlogs(
87
+ sliderBlogs: allAttainLabsCmsBlogs(
88
88
  limit: 9
89
89
  sort: { blocks: { root: { props: { datePublished: DESC } } } }
90
90
  ) {
package/gatsby-node.js CHANGED
@@ -475,7 +475,7 @@ exports.sourceNodes = async (
475
475
  const allBlogs = getAllBlogs(firebaseData);
476
476
 
477
477
  for (const blog of allBlogs) {
478
- const id = createNodeId(`Blog-${blog.id}`);
478
+ const id = createNodeId(`attain-cms-blog-${blog.id}`);
479
479
  const node = {
480
480
  ...blog,
481
481
  id,
@@ -483,7 +483,7 @@ exports.sourceNodes = async (
483
483
  parent: null,
484
484
  children: [],
485
485
  internal: {
486
- type: "Blogs",
486
+ type: "AttainLabsCmsBlogs",
487
487
  contentDigest: createContentDigest(blog),
488
488
  },
489
489
  };
@@ -601,62 +601,7 @@ exports.createPages = async ({ actions, store }, pluginOptions) => {
601
601
  }
602
602
  }
603
603
 
604
- // async function processBlogs(page, parentPath = "") {
605
- // if (page.template === "visual-editor" && page.published && page.type === "blog") {
606
- // const {
607
- // blocks: {
608
- // content,
609
- // root: {
610
- // props: { pageUrl, layout },
611
- // },
612
- // },
613
- // id,
614
- // folderNumber,
615
- // parentFolder
616
- // } = page;
617
-
618
- // // Create slice for each block
619
- // await Promise.all(
620
- // content.map(async (b) => {
621
- // const name = b.props.component.name;
622
- // const sliceId = `block--${pageUrl}--${name}--${id}--${crypto.randomUUID()}`;
623
-
624
- // createSlice({
625
- // id: sliceId,
626
- // component: path.resolve(
627
- // siteRoot,
628
- // "src/cms/components/sliceWrapper.tsx"
629
- // ),
630
- // context: {
631
- // componentPath: `./src/cms/components${b.props.component.path}/index.tsx`,
632
- // ...b.props,
633
- // },
634
- // });
635
-
636
- // b["sliceId"] = sliceId;
637
- // return b;
638
- // })
639
- // );
640
-
641
- // // Generate page file
642
- // const pageSource = await generateBlogPage(content, layout, parentPath);
643
- // const folderPath = pageUrl;
644
- // const outPath = path.join(siteRoot, "src/cms/pages", `${parentFolder}/${folderNumber}/${folderPath}.tsx`);
645
-
646
- // await fse.outputFile(outPath, pageSource);
647
-
648
- // await createPage({
649
- // path: `${parentFolder}/${folderNumber}/${folderPath}`,
650
- // component: outPath,
651
- // context: { ...page },
652
- // });
653
- // }
654
- // }
655
-
656
604
  for (const page of Object.values(firebaseJson)) {
657
605
  await processPage(page);
658
606
  }
659
- // for (const blog of blogsWithFolderNumbers) {
660
- // await processBlogs(blog, brand === "LendDirect" ? "resources" : "blogs");
661
- // }
662
607
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-attainlabs-cms",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -76,7 +76,7 @@ export const TrustPilotQuery = graphql`
76
76
  }
77
77
  }
78
78
  }
79
- allBlogs: allBlogs {
79
+ allBlogs: allAttainLabsCmsBlogs {
80
80
  edges {
81
81
  node {
82
82
  blocks {
@@ -106,7 +106,7 @@ export const TrustPilotQuery = graphql`
106
106
  }
107
107
  }
108
108
  }
109
- sliderBlogs: allBlogs(
109
+ sliderBlogs: allAttainLabsCmsBlogs(
110
110
  limit: 9
111
111
  sort: { blocks: { root: { props: { datePublished: DESC } } } }
112
112
  ) {