From e0ceefa399854df9b783054ad3c1828c3c04462e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madeleine=20Sydney=20=C5=9Alaga?= Date: Sat, 18 Apr 2026 18:27:32 -0600 Subject: [PATCH] fix: server 404 --- src/net/deertopia/doerg/server.clj | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/net/deertopia/doerg/server.clj b/src/net/deertopia/doerg/server.clj index 8a230f0..e88fd83 100644 --- a/src/net/deertopia/doerg/server.clj +++ b/src/net/deertopia/doerg/server.clj @@ -51,9 +51,12 @@ (defn html-dir [] (-> cfg/*cfg* ::cfg/state-directory (fs/file "html"))) -;; This could infinitely look if the 404 page can't be found. lmfao. -(defn not-found [req] - (node-by-slug {:path-params {:slug not-found-slug}}) +(declare node-by-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")) (defn org-file->html-file [org-file]