@@ -13,7 +13,7 @@
|
||||
"Bind to `false` to disable caching for debugging purposes."
|
||||
true)
|
||||
|
||||
(defn cached-content
|
||||
(defn cached-file
|
||||
"Return a file path after potentially regenerating the file by
|
||||
calling `compute` with no arguments only if stale? is logical true."
|
||||
[& {:keys [file stale? compute]}]
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
[hiccup2.core :as hiccup]
|
||||
[net.deertopia.doerg.html :as doerg-html]
|
||||
[net.deertopia.publisher.slug :as slug]
|
||||
[net.deertopia.publisher.config :as cfg]
|
||||
[net.deertopia.publisher.roam :as roam]
|
||||
[org.httpkit.server :as http]
|
||||
[reitit.coercion]
|
||||
@@ -38,22 +39,10 @@
|
||||
(response/content-type "text/html")))
|
||||
|
||||
(defn node-by-slug [{{{:keys [slug]} :path} :parameters}]
|
||||
(-> #_(hiccup/html {}
|
||||
[:html
|
||||
[:head
|
||||
[:title "node by sluggg"]
|
||||
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")))
|
||||
(let [html (-> slug slug/from-string roam/get-node
|
||||
roam/org-file doerg-render/to-html)]
|
||||
(-> html response/response
|
||||
(response/content-type "text/html"))))
|
||||
|
||||
(defn node-by-id [req]
|
||||
(hello req))
|
||||
|
||||
Reference in New Issue
Block a user