fix parsing of date parts of post url to allow 2-digit days and months
For more compatibility with the old Wordpress URLs
This commit is contained in:
parent
cb1d5391f5
commit
e2357aaa1b
|
@ -61,7 +61,7 @@
|
|||
"posts/listarchive.html" {:months (posts/list-posts-archive (auth/logged-in?))}))
|
||||
|
||||
(defn show-post-page [year month day slug]
|
||||
(let [date (str year "-" month "-" day)
|
||||
(let [date (str (string->int year) "-" (string->int month) "-" (string->int day))
|
||||
post (posts/get-post-by-date-slug date slug)]
|
||||
(if (not-empty post)
|
||||
(layout/render
|
||||
|
|
Reference in a new issue