spike: feed per tag

parent 3e2f1b94
......@@ -39,6 +39,11 @@
[{:keys [permalink]} doc-type]
(.startsWith permalink (str "/" doc-type)))
(defn includes-tag?
[{:keys [tags] :as post} tag]
(and (is-of-type? post "post")
(some #{tag} tags)))
(deftask slack
"Post `message` to slack."
[u url URL str "The slack incoming webhook url"
......@@ -190,6 +195,13 @@
;; XXX: This works, but of course doesn't scale as it would require
;; that we manually register all the tags here. It would probably
;; work to use an assortment task which delegates to the atom-feed
;; task.
(perun/atom-feed :filterer #(includes-tag? % "programming")
:filename "programming-feed.xml")
(perun/static :renderer 'ok.data.index/page :page "index.html")
(perun/static :renderer 'ok.data.people/page :page "people.html")
(perun/static :renderer 'ok.data.technologies/page :page "technologies.html")
......@@ -237,10 +249,8 @@
(perun/atom-feed :filterer #(is-of-type? % "posts")
;; setting base-url explicitly is a quickfix for
;; a perun bug of some sort
:base-url "http://200ok.ch/")
(perun/atom-feed :filterer #(is-of-type? % "posts"))
(perun/rss :filterer #(is-of-type? % "posts")
:filename "rss.xml")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment