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:
Gered 2013-06-07 19:07:51 -04:00
parent cb1d5391f5
commit e2357aaa1b

View file

@ -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