diff --git a/src/model.ml b/src/model.ml index 950517b..fb52ba6 100644 --- a/src/model.ml +++ b/src/model.ml @@ -51,6 +51,8 @@ module Index = struct let inject (type a) (module D : Key_value.DESCRIBABLE with type t = a) t = D.[ "active", object_ $ [ "page", string "index" ] + ; "page", object_ $ [ "title", string (Option.value ~default:"" t.title) + ; "description", string (Option.value ~default:"" t.description) ] ; "cooperative", object_ $ [ "body", string t.cooperative ] ; "what_we_do", object_ $ [ "body", string t.what_we_do ] ] @ (Metadata.Page.inject (module D) (Metadata.Page.make t.title t.description)) @@ -66,7 +68,9 @@ module About_us = struct ; description= Metadata.Page.description page } let inject (type a) (module D : Key_value.DESCRIBABLE with type t = a) t = - D.[ "active", object_ $ [ "page", string "about_us" ] ] + D.[ "active", object_ $ [ "page", string "about_us" ] + ; "page", object_ $ [ "title", string (Option.value ~default:"" t.title) + ; "description", string (Option.value ~default:"" t.description) ] ] @ (Metadata.Page.inject (module D) (Metadata.Page.make t.title t.description)) end