on master help sign in
Added a comment explaining "teaserContext" function.
9ad0d38Ivan N. Veselov
src/Hakyll/Web/Template/Context.hs+3
@@ -92,6 +92,9 @@ defaultContext =
92 missingField
92 missingField
93
93
94--------------------------------------------------------------------------------
94--------------------------------------------------------------------------------
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).
95teaserContext :: Snapshot -> Context String
98teaserContext :: Snapshot -> Context String
96teaserContext snapshot = field "teaser" $ \item ->
99teaserContext snapshot = field "teaser" $ \item ->
97 (needlePrefix teaserSeparator . itemBody) <$>
100 (needlePrefix teaserSeparator . itemBody) <$>