all repos — kushiyaki @ f234f8efc590c7b7ab85b5aacdc88df69f5cc4fa

🍢 A tiny static site generator for grilling markdown files to perfection

feat: unenforce file structure from globs
trickyni trickyniv56@gmail.com
Fri, 08 May 2026 20:56:36 +0300
commit

f234f8efc590c7b7ab85b5aacdc88df69f5cc4fa

parent

dd2208a3ddbe119a993f866f53c8cb29fe881dc8

2 files changed, 5 insertions(+), 5 deletions(-)

jump to
M createSiteIndex.jscreateSiteIndex.js

@@ -3,7 +3,7 @@ import { glob } from "glob";

export async function createSiteIndex() { let siteIndex = []; - for (const file of await glob("input/content/**/*", { nodir: true })) { + for (const file of await glob("input/**/*.md", { nodir: true })) { siteIndex.push(await extractFrontmatter(file)); } return siteIndex;
M looper.jslooper.js

@@ -1,15 +1,15 @@

-import { emptyDir, writeFile } from "fs-extra"; +import { emptyDir, ensureDir, ensureFile, writeFile } from "fs-extra"; import { joinComponents } from "./joinComponents"; import cpy from "cpy"; import { glob } from "glob"; //mise en place await emptyDir("out", { recursive: true }); // clears the output folder -await cpy("input/assets", "out", { flat: true }); //copies all the assets into out/ +await cpy(["input/**", "!input/**/*{.md,.jsx}"], "out", { flat: true }); //copies all the assets into out/ -for (const file of await glob("input/content/**/*", { nodir: true })) { +for (const file of await glob("input/**/*.md", { nodir: true })) { await writeFile( - file.replace(/input\/content[\/\w]*\//, "out/").replace(".md", ".html"), + file.replace(/input[\/\w]*\//, "out/").replace(".md", ".html"), await joinComponents(file), ); }