* Add 404 and 500 page Co-authored-by: hashrock <hashrock@users.noreply.github.com>
This commit is contained in:
co-authored by
hashrock
parent
55f657827f
commit
3431555f95
@@ -34,9 +34,7 @@ export const handler: Handlers<Data> = {
|
||||
}
|
||||
const entry = TABLE_OF_CONTENTS[slug];
|
||||
if (!entry) {
|
||||
return new Response("404 Page not found", {
|
||||
status: 404,
|
||||
});
|
||||
return ctx.renderNotFound();
|
||||
}
|
||||
const url = new URL(`../../../${entry.file}`, import.meta.url);
|
||||
const fileContent = await Deno.readTextFile(url);
|
||||
|
||||
Reference in New Issue
Block a user