All checks were successful
build / build (push) Successful in 1m42s

This commit is contained in:
2026-03-21 20:33:09 -06:00
parent a8477cafbf
commit 674882c38d
2 changed files with 6 additions and 17 deletions

View File

@@ -13,7 +13,7 @@
"Bind to `false` to disable caching for debugging purposes." "Bind to `false` to disable caching for debugging purposes."
true) true)
(defn cached-content (defn cached-file
"Return a file path after potentially regenerating the file by "Return a file path after potentially regenerating the file by
calling `compute` with no arguments only if stale? is logical true." calling `compute` with no arguments only if stale? is logical true."
[& {:keys [file stale? compute]}] [& {:keys [file stale? compute]}]

View File

@@ -4,6 +4,7 @@
[hiccup2.core :as hiccup] [hiccup2.core :as hiccup]
[net.deertopia.doerg.html :as doerg-html] [net.deertopia.doerg.html :as doerg-html]
[net.deertopia.publisher.slug :as slug] [net.deertopia.publisher.slug :as slug]
[net.deertopia.publisher.config :as cfg]
[net.deertopia.publisher.roam :as roam] [net.deertopia.publisher.roam :as roam]
[org.httpkit.server :as http] [org.httpkit.server :as http]
[reitit.coercion] [reitit.coercion]
@@ -38,22 +39,10 @@
(response/content-type "text/html"))) (response/content-type "text/html")))
(defn node-by-slug [{{{:keys [slug]} :path} :parameters}] (defn node-by-slug [{{{:keys [slug]} :path} :parameters}]
(-> #_(hiccup/html {} (let [html (-> slug slug/from-string roam/get-node
[:html roam/org-file doerg-render/to-html)]
[:head (-> html response/response
[:title "node by sluggg"] (response/content-type "text/html"))))
doerg-html/charset
doerg-html/viewport]
[:body
[:h1 "node by slug"]
[:pre
(-> slug slug/from-string roam/get-node
roam/org-file doerg-render/to-html)]]])
(-> slug slug/from-string roam/get-node
roam/org-file doerg-render/to-html)
str
response/response
(response/content-type "text/html")))
(defn node-by-id [req] (defn node-by-id [req]
(hello req)) (hello req))