mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2026-03-01 18:31:35 +00:00
Add proper custom 404 page
This commit is contained in:
parent
21ec920516
commit
9d86bdbc74
5 changed files with 25 additions and 19 deletions
10
src/site/pug/404.pug
Normal file
10
src/site/pug/404.pug
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
include includes/error
|
||||
|
||||
doctype html
|
||||
html
|
||||
head
|
||||
title Not found | Bibliogram
|
||||
include includes/head
|
||||
|
||||
body.error-page
|
||||
+error(404, "Page not found.")
|
||||
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
include includes/error.pug
|
||||
|
||||
- const numberFormat = new Intl.NumberFormat().format
|
||||
|
||||
doctype html
|
||||
html
|
||||
head
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ subdirs("pug", async (err, dirs) => {
|
|||
// need to check for and run db upgrades before anything starts using it
|
||||
await require("../lib/utils/upgradedb")()
|
||||
|
||||
//pinski.addRoute("/", "pug/index.pug", "pug")
|
||||
pinski.addRoute("/404", "pug/404.pug", "pug")
|
||||
pinski.setNotFoundTarget("/404")
|
||||
pinski.addRoute("/static/css/main.css", "sass/main.sass", "sass")
|
||||
pinski.addPugDir("pug", dirs)
|
||||
pinski.addAPIDir("html/static/js/templates/api")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue