add post url support to match the old wordpress style (trailing slash)
This commit is contained in:
parent
2013314043
commit
f9e01cea1f
|
@ -118,7 +118,11 @@
|
|||
(defroutes posts-routes
|
||||
(GET "/" [page] (list-page (parse-int page 0)))
|
||||
(GET
|
||||
["/:year/:month/:day/:slug" :year #"[0-9]{4}" :month #"[0-9]{1,2}" :day #"[0-9]{1,2}" :slug #"(.*)"]
|
||||
["/:year/:month/:day/:slug/" :year #"[0-9]{4}" :month #"[0-9]{1,2}" :day #"[0-9]{1,2}" :slug #"(.*)"]
|
||||
[year month day slug]
|
||||
(show-post-page year month day slug))
|
||||
(GET
|
||||
["/:year/:month/:day/:slug" :year #"[0-9]{4}" :month #"[0-9]{1,2}" :day #"[0-9]{1,2}" :slug #"(.*)"]
|
||||
[year month day slug]
|
||||
(show-post-page year month day slug))
|
||||
(GET "/tag/:tag" [tag] (list-by-tag tag))
|
||||
|
|
Reference in a new issue