From 1a75abb0e4e46cb08828765714b0cf6c6554b458 Mon Sep 17 00:00:00 2001 From: Scot Brown Date: Tue, 13 Dec 2016 15:59:09 -0500 Subject: [PATCH] conditionally drop any posts with dates set in the future --- src/cryogen_core/compiler.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cryogen_core/compiler.clj b/src/cryogen_core/compiler.clj index 85d5ee2..196aa03 100644 --- a/src/cryogen_core/compiler.clj +++ b/src/cryogen_core/compiler.clj @@ -141,7 +141,8 @@ (remove #(= (:draft? %) true)))) (m/markups)) (sort-by :date) - reverse)) + reverse + (drop-while #(and (:hide-future-posts? config) (.after (:date %) (:today config)))))) (defn read-pages "Returns a sequence of maps representing the data from markdown files of pages.