3 [blog.gemtext :as gemtext]
5 [clojure.data.xml :refer :all]
6 [commonmark-hiccup.core :refer [markdown->hiccup default-config]]
7 [hiccup.core :as hiccup]))
9 (defn item [linkfn {:keys [title date slug tags short body gemtext?]}]
10 (let [link (linkfn slug)]
18 (-> body gemtext/parse gemtext/to-hiccup)
19 (markdown->hiccup default-config body)))]])
22 [:pubDate (time/fmt-rfc-2822 date)]]))
24 (defn feed [linkfn posts]
27 [:rss {:version "2.0" :xmlns:atom "http://www.w3.org/2005/Atom"}
30 [:description "Writing about things, sometimes"]
31 [:link "https://www.omarpolo.com"]
33 ;; [:atom:link {:href "https://www.omarpolo.com/rss.xml" :ref "self" :type "application/rss+xml"} nil]
34 (map (partial item linkfn)