conditionally drop any posts with dates set in the future

This commit is contained in:
Scot Brown 2016-12-13 15:59:09 -05:00
parent bb4d772611
commit 1a75abb0e4

View file

@ -141,7 +141,8 @@
(remove #(= (:draft? %) true)))) (remove #(= (:draft? %) true))))
(m/markups)) (m/markups))
(sort-by :date) (sort-by :date)
reverse)) reverse
(drop-while #(and (:hide-future-posts? config) (.after (:date %) (:today config))))))
(defn read-pages (defn read-pages
"Returns a sequence of maps representing the data from markdown files of pages. "Returns a sequence of maps representing the data from markdown files of pages.