Merge branch 'post-date' of https://github.com/powernoodle/cryogen-core into powernoodle-post-date

This commit is contained in:
Carmen La 2015-08-06 13:37:50 -04:00
commit 837f855726

View file

@ -103,7 +103,9 @@
(let [{:keys [file-name page-meta content]} (page-content page config markup)] (let [{:keys [file-name page-meta content]} (page-content page config markup)]
(merge (merge
(merge-meta-and-content file-name page-meta content) (merge-meta-and-content file-name page-meta content)
(let [date (parse-post-date file-name (:post-date-format config)) (let [date (if (:date page-meta)
(.parse (java.text.SimpleDateFormat. (:post-date-format config)) (:date page-meta))
(parse-post-date file-name (:post-date-format config)))
archive-fmt (java.text.SimpleDateFormat. "yyyy MMMM" (Locale/getDefault)) archive-fmt (java.text.SimpleDateFormat. "yyyy MMMM" (Locale/getDefault))
formatted-group (.format archive-fmt date)] formatted-group (.format archive-fmt date)]
{:date date {:date date