feat: node title

This commit is contained in:
2026-04-18 16:55:10 -06:00
parent 5472d93cff
commit 32a45b3a16
2 changed files with 5 additions and 3 deletions

View File

@@ -63,14 +63,15 @@
(defn org-document (defn org-document
"Recursively render an Org-mode document to Hiccup." "Recursively render an Org-mode document to Hiccup."
[doc & {:as opts :keys [postamble header]}] [doc & {:as opts :keys [postamble header title]}]
(binding [*opts* opts] (binding [*opts* opts]
(tex-temml/binding-worker (tex-temml/binding-worker
(let [rendered (-> doc gather-footnotes render-tex-snippets (let [rendered (-> doc gather-footnotes render-tex-snippets
org-element-recursive)] org-element-recursive)]
[:html [:html
[:head [:head
[:title "org document"] (when title
[:title title])
doerg-html/head] doerg-html/head]
[:body {:lang default-language} [:body {:lang default-language}
(when header (when header

View File

@@ -111,7 +111,8 @@
:compute #(doerg-render/to-html :compute #(doerg-render/to-html
org-file org-file
:postamble (backlinks-postamble node) :postamble (backlinks-postamble node)
:header navbar)) :header navbar
:title (roam/title node)))
(-> (str html-file) (-> (str html-file)
response/file-response response/file-response
(response/content-type "text/html"))) (response/content-type "text/html")))