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
|
(if-let [posts (->post-list
|
||||||
(couch/with-db posts
|
(couch/with-db posts
|
||||||
(couch/get-view "posts" view-name {:descending true})))]
|
(couch/get-view "posts" view-name {:descending true})))]
|
||||||
(group-by
|
(vals
|
||||||
(fn [p]
|
(group-by
|
||||||
(->nicer-month-year-str (:mmyyyy p)))
|
(fn [p]
|
||||||
posts))))
|
(:mmyyyy p))
|
||||||
|
(map
|
||||||
|
(fn [p]
|
||||||
|
(assoc p :mmyyyy (->nicer-month-year-str (:mmyyyy p))))
|
||||||
|
posts))))))
|
||||||
|
|
||||||
(defn count-posts
|
(defn count-posts
|
||||||
[unpublished?]
|
[unpublished?]
|
||||||
|
|
Reference in a new issue