on master help sign in
Added a comment explaining "teaserContext" function.
commit9ad0d38f431c02e848bc675c0ff9f582d49c5e32 authorIvan N. Veselov <veselov@gmail.com> dateSat 4 May 2013, 17:48 (14 years ago) parent2651627
1 file changed+3
src/Hakyll/Web/Template/Context.hs+3
src/Hakyll/Web/Template/Context.hs+3
@@ -92,6 +92,9 @@ defaultContext =
9292 missingField
9393
9494--------------------------------------------------------------------------------
95+-- | A context with "teaser" key which contain a teaser of the item.
96+-- The item is loaded from the given snapshot (which should be saved
97+-- in the user code before any templates are applied).
9598teaserContext :: Snapshot -> Context String
9699teaserContext snapshot = field "teaser" $ \item ->
97100 (needlePrefix teaserSeparator . itemBody) <$>