gatsby-attainlabs-cms 1.0.38 → 1.0.39

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.
Files changed (2) hide show
  1. package/gatsby-node.js +2 -57
  2. package/package.json +1 -1
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.39",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",