all repos — kushiyaki @ 9295af41432fa98494bf86bf65860235711d86b5

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

feat: add createSiteIndex.js
trickyni trickyniv56@gmail.com
Tue, 05 May 2026 11:39:19 +0300
commit

9295af41432fa98494bf86bf65860235711d86b5

parent

7279eab4d8ffddd4631741e4d788ad76ee4250fc

2 files changed, 11 insertions(+), 1 deletions(-)

jump to
M .gitignore.gitignore

@@ -3,4 +3,4 @@ out

__TODO.md design-document.md node_modules -writePage.js +addons
A createSiteIndex.js

@@ -0,0 +1,10 @@

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