on master help sign in
Added docs
commitcf61a95ff05b48c6e92c202fe4f469b496fcbab7 authoriko <ilyakooo0@gmail.com> dateThu 29 Aug 2019, 14:33 (7 years ago) parenteff77ca
1 file changed+4
lib/Hakyll/Web/Template/Context.hs+4
lib/Hakyll/Web/Template/Context.hs+4
@@ -135,6 +135,10 @@ listField key c xs = listFieldWith key c (const xs)
135135
136136
137137--------------------------------------------------------------------------------
138+-- | Produces a new 'Context' which has list field 'key'. All fields from
139+-- 'c' are also accessible from the produced context.
140+-- Be careful when doing @listFieldWith k ca f <> cb@ as any fields in @ca@
141+-- will override fields in @cb@ with the same name.
138142listFieldWith
139143 :: String -> Context a -> (Item b -> Compiler [Item a]) -> Context b
140144listFieldWith key c f = field' key $ fmap (ListField c) . f