diff --git a/lib/action/articles.ml b/lib/action/articles.ml index 7b30c6c..40b1393 100644 --- a/lib/action/articles.ml +++ b/lib/action/articles.ml @@ -1,17 +1,16 @@ let run (module R : Sigs.RESOLVER) chain = - Yocaml.Action.write_static_file R.Target.blog + Yocaml.Action.Static.write_file_with_metadata R.Target.blog (let open Yocaml.Task in R.track_common_dependencies >>> Yocaml.Pipeline.track_file R.Source.articles >>> Yocaml_yaml.Pipeline.read_file_with_metadata (module Model.Page) R.Source.blog - >>> first @@ Model.Articles.index chain R.Source.articles + >>> Static.on_metadata @@ Model.Articles.index chain R.Source.articles >>> Yocaml_omd.content_to_html () >>> Yocaml_jingoo.Pipeline.as_template (module Model.Articles) (R.Source.template "blog.html") >>> Yocaml_jingoo.Pipeline.as_template (module Model.Articles) - (R.Source.template "layout.html") - >>> drop_first ()) + (R.Source.template "layout.html")) diff --git a/lib/action/atom.ml b/lib/action/atom.ml index ffbf3a2..934d448 100644 --- a/lib/action/atom.ml +++ b/lib/action/atom.ml @@ -1,5 +1,5 @@ let run (module R : Sigs.RESOLVER) chain = - Yocaml.Action.write_static_file R.Target.atom + Yocaml.Action.Static.write_file R.Target.atom (let open Yocaml.Task in R.track_common_dependencies >>> Yocaml.Pipeline.track_file R.Source.articles diff --git a/lib/action/chain.ml b/lib/action/chain.ml index 9646592..774c81f 100644 --- a/lib/action/chain.ml +++ b/lib/action/chain.ml @@ -5,19 +5,18 @@ let member (module R : Sigs.RESOLVER) pred_or_succ current_member target_member ~id:(Model.Member.id current_member) pred_or_succ in - Yocaml.Action.write_static_file target + Yocaml.Action.Static.write_file_with_metadata target (let open Yocaml.Task in R.track_common_dependencies >>> const target_member >>> empty_body () >>> Yocaml_jingoo.Pipeline.as_template (module Model.Member) - (R.Source.template "redirect.html") - >>> drop_first ()) + (R.Source.template "redirect.html")) let index (module R : Sigs.RESOLVER) current_member pred succ = let target = R.Target.member ~id:(Model.Member.id current_member) in - Yocaml.Action.write_static_file target + Yocaml.Action.Static.write_file_with_metadata target (let open Yocaml.Task in R.track_common_dependencies >>> Yocaml.Pipeline.track_file R.Source.members @@ -28,8 +27,7 @@ let index (module R : Sigs.RESOLVER) current_member pred succ = (R.Source.template "member.html") >>> Yocaml_jingoo.Pipeline.as_template (module Model.Member_page) - (R.Source.template "layout.html") - >>> drop_first ()) + (R.Source.template "layout.html")) let run (module R : Sigs.RESOLVER) chain = let member = member (module R) in diff --git a/lib/action/index.ml b/lib/action/index.ml index 5694d1e..4b81f4d 100644 --- a/lib/action/index.ml +++ b/lib/action/index.ml @@ -1,5 +1,5 @@ let run (module R : Sigs.RESOLVER) chain = - Yocaml.Action.write_static_file R.Target.index + Yocaml.Action.Static.write_file_with_metadata R.Target.index (let open Yocaml.Task in R.track_common_dependencies >>> Yocaml.Pipeline.track_file R.Source.members @@ -13,5 +13,4 @@ let run (module R : Sigs.RESOLVER) chain = (R.Source.template "index.html") >>> Yocaml_jingoo.Pipeline.as_template (module Model.Index) - (R.Source.template "layout.html") - >>> drop_first ()) + (R.Source.template "layout.html")) diff --git a/lib/action/opml.ml b/lib/action/opml.ml index 943e0d4..706e2ac 100644 --- a/lib/action/opml.ml +++ b/lib/action/opml.ml @@ -1,5 +1,5 @@ let run (module R : Sigs.RESOLVER) chain = - Yocaml.Action.write_static_file R.Target.ring_opml + Yocaml.Action.Static.write_file R.Target.ring_opml (let open Yocaml.Task in R.track_common_dependencies >>> Yocaml.Pipeline.track_file R.Source.members