update list-posts-archive to make the results easier to work with in a clabango template
This commit is contained in:
parent
d9178c25a0
commit
475f3e397d
|
@ -96,10 +96,14 @@
|
|||
(if-let [posts (->post-list
|
||||
(couch/with-db posts
|
||||
(couch/get-view "posts" view-name {:descending true})))]
|
||||
(group-by
|
||||
(fn [p]
|
||||
(->nicer-month-year-str (:mmyyyy p)))
|
||||
posts))))
|
||||
(vals
|
||||
(group-by
|
||||
(fn [p]
|
||||
(:mmyyyy p))
|
||||
(map
|
||||
(fn [p]
|
||||
(assoc p :mmyyyy (->nicer-month-year-str (:mmyyyy p))))
|
||||
posts))))))
|
||||
|
||||
(defn count-posts
|
||||
[unpublished?]
|
||||
|
|
Reference in a new issue