diff --git a/scripts/generate_fs_list.js b/scripts/generate_fs_list.js index 0ccb5e3..34baf24 100644 --- a/scripts/generate_fs_list.js +++ b/scripts/generate_fs_list.js @@ -1,5 +1,6 @@ const { resolve } = require("path"); const { readdir } = require("fs").promises; +const mime = require("mime-types"); async function getFiles(dir) { const dirents = await readdir(dir, { withFileTypes: true }); @@ -19,6 +20,8 @@ getFiles(rootDir).then((files) => { .map((file) => ({ name: file.substring(rootDir.length + 1), lastModified: 0, + contentType: mime.lookup(file), + size: 0, perm: "rw", })) .filter((pageMeta) => !pageMeta.name.startsWith(".")); diff --git a/website/_redirects b/website/_redirects index 88453e4..c620734 100644 --- a/website/_redirects +++ b/website/_redirects @@ -1,3 +1,3 @@ -/page /index.json 200 -/page/* /empty.md 200 +/fs /index.json 200 +/fs/* /empty.md 200 /* /index.html 200 \ No newline at end of file