all repos — kushiyaki @ f18c0bbf8c19a3ddc1cc40e4d2e5f38c7b4c7216

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

createSiteIndex.js (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
import { extractFrontmatter } from "./extractFrontmatter";
import { glob } from "glob";

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