import { extractFrontmatter } from "./extractFrontmatter"; import { writePage } from "./writePage"; import { copy, emptyDir, ensureDir, writeFile, readdir } from "fs-extra"; import cpy from "cpy"; import glob from "glob"; //mise en place await emptyDir("out/", { recursive: true }); // clears the output folder await ensureDir("out/assets"); await cpy("./input/assets", "./out/assets", { flat: true }); const contentDir = await glob("./input/content/", { nodir: true, withFileTypes: true, }); await Promise.all( contentDir .filter((f) => f.isFile()) .map((f) => console.log(extractFrontmatter(f.path))), ); // for (let file of contentDir) { // if (file.isFile()) { // console.log(await extractFrontmatter(file.path)); // } // } // async function indexSite() { // const // return // }