shadowfacts.net/lib/generate/missing.ts

18 lines
449 B
TypeScript
Raw Normal View History

2019-01-04 18:14:53 +00:00
import ejs from "ejs";
import * as metadata from "../metadata";
import layout from "../layout";
import * as util from "../util";
export default async function missing() {
const page = await metadata.get("site/404.html.ejs");
page.text = ejs.render(page.text, {
metadata: page.metadata
}, {
filename: "site/404.html.ejs"
});
page.text = await layout(page.text, page.metadata, page.metadata.layout!);
util.write("404.html", page.text);
}