update (simplify) view filters. add "is-empty" filter
This commit is contained in:
parent
38c764ef61
commit
b583d5f52a
|
@ -8,25 +8,24 @@
|
||||||
|
|
||||||
(add-filter!
|
(add-filter!
|
||||||
:md-to-html
|
:md-to-html
|
||||||
(fn [s]
|
#(md/md-to-html-string %))
|
||||||
(md/md-to-html-string s)))
|
|
||||||
|
|
||||||
(add-filter!
|
(add-filter!
|
||||||
:post-url
|
:post-url
|
||||||
(fn [post]
|
#(get-post-url %))
|
||||||
(get-post-url post)))
|
|
||||||
|
|
||||||
(add-filter!
|
(add-filter!
|
||||||
:to_relative
|
:to_relative
|
||||||
(fn [date]
|
#(->relative-timestamp %))
|
||||||
(->relative-timestamp date)))
|
|
||||||
|
|
||||||
(add-filter!
|
(add-filter!
|
||||||
:to_month-day
|
:to_month-day
|
||||||
(fn [date]
|
#(->month-day-str %))
|
||||||
(->month-day-str date)))
|
|
||||||
|
|
||||||
(add-filter!
|
(add-filter!
|
||||||
:to_fulltime
|
:to_fulltime
|
||||||
(fn [date]
|
#(clj-time.local/format-local-time % :rfc822))
|
||||||
(clj-time.local/format-local-time date :rfc822)))
|
|
||||||
|
(add-filter!
|
||||||
|
:is-empty
|
||||||
|
#(empty? %))
|
Reference in a new issue