shadowfacts.net/lib/generate/missing.ts

15 lines
410 B
TypeScript
Raw Normal View History

2019-01-04 18:14:53 +00:00
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");
2019-01-05 02:59:52 +00:00
page.text = util.render(page.text, {
2019-01-04 18:14:53 +00:00
metadata: page.metadata
2019-01-05 02:59:52 +00:00
}, "site/404.html.ejs");
2019-01-04 18:14:53 +00:00
page.text = await layout(page.text, page.metadata, page.metadata.layout!);
util.write("404.html", page.text);
}