Optional :date key can be provided in metadata
This commit is contained in:
parent
85ea98f0ff
commit
e710f08679
1 changed files with 5 additions and 1 deletions
|
@ -102,7 +102,11 @@
|
|||
(let [{:keys [file-name page-meta content]} (page-content page config markup)]
|
||||
(merge
|
||||
(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" (java.util.Locale. "en"))
|
||||
formatted-group (.format archive-fmt date)]
|
||||
{:date date
|
||||
|
|
Loading…
Reference in a new issue