hide unlisted or unpublished files
This commit is contained in:
parent
c22e2df3ad
commit
a9191781cb
@ -45,6 +45,11 @@ let article_link (file, meta) =
|
||||
|
||||
let of_file_meta_pairs ?(header_tpl=None) ?(listing_tpl=None) ?(entry_tpl=None) blog_url lgrn file_meta_pairs =
|
||||
let t = Logarion.Configuration.(lgrn.title) in
|
||||
let file_meta_pairs =
|
||||
file_meta_pairs
|
||||
|> List.filter Ymd.(fun (_,a) -> not @@ CategorySet.categorised [Category.Unlisted] a.categories)
|
||||
|> List.fast_sort Ymd.(fun (_,a) (_,b) -> compare (Date.last a.date) (Date.last b.date))
|
||||
in
|
||||
logarion_page
|
||||
~header_tpl
|
||||
blog_url
|
||||
|
@ -76,7 +76,7 @@ let () =
|
||||
let (>>=) = Lwt.(>>=)
|
||||
and (>|=) = Lwt.(>|=) in
|
||||
let module L = Logarion in
|
||||
let ymd f = L.of_file f in
|
||||
let ymd f = L.of_file f |> (fun ymd -> if Ymd.(categorised [Category.Published]) ymd then ymd else Ymd.blank_ymd ()) in
|
||||
let ret_param name req = Lwt.return (param req name) in
|
||||
let option_load tpl o = match o with Some f -> Some (tpl f) | None -> None in
|
||||
let header_tpl = option_load Template.header Configuration.(webcfg.template.header) in
|
||||
|
Loading…
x
Reference in New Issue
Block a user