gatsby-attainlabs-cms 1.0.22 → 1.0.23
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.
- package/gatsby-node.js +5 -5
- package/package.json +5 -4
package/gatsby-node.js
CHANGED
|
@@ -12,7 +12,7 @@ const brands = {
|
|
|
12
12
|
"Attain Finance": "attainfinance",
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
const generatePage = async (blocks) => {
|
|
15
|
+
const generatePage = async (blocks, layout) => {
|
|
16
16
|
// Validate input parameters
|
|
17
17
|
if (!Array.isArray(blocks)) {
|
|
18
18
|
throw new Error("Invalid parameters passed to createPage.");
|
|
@@ -33,7 +33,7 @@ const generatePage = async (blocks) => {
|
|
|
33
33
|
/* This is a generated file by the gatsby-attainlabs-cms plugin. Any changes will be overwritten on the next build. */
|
|
34
34
|
import { Slice } from "gatsby";
|
|
35
35
|
import SEO from "../components/SEO";
|
|
36
|
-
import Layout from "../layouts
|
|
36
|
+
import Layout from "../layouts/${layout}";
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
@@ -390,7 +390,7 @@ exports.createPages = async ({ actions, store }, pluginOptions) => {
|
|
|
390
390
|
blocks: {
|
|
391
391
|
content,
|
|
392
392
|
root: {
|
|
393
|
-
props: { pageUrl },
|
|
393
|
+
props: { pageUrl, layout },
|
|
394
394
|
},
|
|
395
395
|
},
|
|
396
396
|
},
|
|
@@ -404,7 +404,7 @@ exports.createPages = async ({ actions, store }, pluginOptions) => {
|
|
|
404
404
|
content.map(async (b) => {
|
|
405
405
|
const name = b.props.component.name;
|
|
406
406
|
const sliceId = `block--${pageUrl}--${name}--${id}--${crypto.randomUUID()}`;
|
|
407
|
-
console.log(`Creating slice: ${sliceId}`);
|
|
407
|
+
// console.log(`Creating slice: ${sliceId}`);
|
|
408
408
|
// here we could await something per slice if needed later
|
|
409
409
|
createSlice({
|
|
410
410
|
id: sliceId,
|
|
@@ -422,7 +422,7 @@ exports.createPages = async ({ actions, store }, pluginOptions) => {
|
|
|
422
422
|
})
|
|
423
423
|
);
|
|
424
424
|
|
|
425
|
-
const pageSource = await generatePage(content,
|
|
425
|
+
const pageSource = await generatePage(content, layout);
|
|
426
426
|
const outPath = path.join(siteRoot, "src/cms/pages", `${pageUrl}.tsx`);
|
|
427
427
|
|
|
428
428
|
await fse.outputFile(outPath, pageSource);
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-attainlabs-cms",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
9
|
"build": "tsc",
|
|
10
|
-
"publish"
|
|
10
|
+
"publish": "npm version minor && npm publish"
|
|
11
11
|
},
|
|
12
12
|
"author": "Anthony Barrera",
|
|
13
13
|
"license": "ISC",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"gatsby-source-filesystem": "^5.15.0",
|
|
24
24
|
"gatsby-transformer-sharp": "^5.15.0",
|
|
25
25
|
"prettier": "^3.6.2",
|
|
26
|
-
"react-slick": "^0.31.0"
|
|
26
|
+
"react-slick": "^0.31.0",
|
|
27
|
+
"uuid": "^13.0.0"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
30
|
"typescript": "^5.9.2"
|