@daz4126/swifty 1.11.0 → 1.12.0
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/package.json +1 -1
- package/swifty.js +2 -3
package/package.json
CHANGED
package/swifty.js
CHANGED
|
@@ -232,9 +232,8 @@ const generatePages = async (sourceDir, baseDir = sourceDir, parent) => {
|
|
|
232
232
|
const name = root ? "Home" : capitalize(file.name.replace(/\.md$/, "").replace(/-/g, " "));
|
|
233
233
|
const stats = await fs.stat(filePath);
|
|
234
234
|
const isDirectory = file.isDirectory();
|
|
235
|
-
const
|
|
236
|
-
const
|
|
237
|
-
const layout = !root && layoutFileExists && assetPath;
|
|
235
|
+
const layoutFileExists = parent && await fsExtra.pathExists(dirs.layouts + "/" + parent.filename + ".html");
|
|
236
|
+
const layout = layoutFileExists ? parent.filename : parent ? parent.layout : "pages";
|
|
238
237
|
|
|
239
238
|
const page = {
|
|
240
239
|
name, root, layout,
|