fix: server 404
This commit is contained in:
@@ -51,9 +51,12 @@
|
|||||||
(defn html-dir []
|
(defn html-dir []
|
||||||
(-> cfg/*cfg* ::cfg/state-directory (fs/file "html")))
|
(-> cfg/*cfg* ::cfg/state-directory (fs/file "html")))
|
||||||
|
|
||||||
;; This could infinitely look if the 404 page can't be found. lmfao.
|
(declare node-by-slug)
|
||||||
(defn not-found [req]
|
|
||||||
(node-by-slug {:path-params {:slug not-found-slug}})
|
;; This could infinitely loop if the 404 page can't be found. lmfao.
|
||||||
|
(defn not-found [_req]
|
||||||
|
(-> (node-by-slug {:path-params {:slug not-found-slug}})
|
||||||
|
(assoc :status 404))
|
||||||
#_(response/not-found "not found"))
|
#_(response/not-found "not found"))
|
||||||
|
|
||||||
(defn org-file->html-file [org-file]
|
(defn org-file->html-file [org-file]
|
||||||
|
|||||||
Reference in New Issue
Block a user