Merge branch 'post-date' of https://github.com/powernoodle/cryogen-core into powernoodle-post-date
This commit is contained in:
commit
837f855726
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue