14a9e325836e lisp
Add 404 page
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Sun, 05 Jan 2020 18:23:13 -0500 |
parents | 65c17aa7972b |
children | 721e4d30593f |
branches/tags | lisp |
files | generate.lisp |
Changes
--- a/generate.lisp Sun Jan 05 18:21:15 2020 -0500 +++ b/generate.lisp Sun Jan 05 18:23:13 2020 -0500 @@ -201,6 +201,12 @@ (:a :href "mailto:steve@stevelosh.com" "email") " is best.")))) +(defun t/404 () + (with-base ("not-found") + (who + (:h1 "404 Not Fount") + (:p "If you followed a link to get here, it's bad.")))) + ;;;; Generation --------------------------------------------------------------- (defparameter *generate-timestamp* (file-write-date "generate.lisp")) @@ -231,6 +237,10 @@ (render "build/index.html" nil (t/home))) +(defun page/404 () + (render "build/404.html" nil + (t/404))) + (defun page/blog/index (entries) (render "build/blog/index.html" (mapcar #'modified-timestamp entries) (t/blog/index entries))) @@ -261,6 +271,7 @@ (links (read-content "content/links.markdown")) (projects (read-content "content/projects.markdown"))) (page/home) + (page/404) (page/blog/index blog-entries) (page/blog/entries blog-entries) (page/photography/index photo-galleries)