summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan N. Veselov <veselov@gmail.com>2013-05-04 17:48:37 +0300
committerIvan N. Veselov <veselov@gmail.com>2013-05-04 17:48:51 +0300
commit9ad0d38f431c02e848bc675c0ff9f582d49c5e32 (patch)
tree707adf972ef4a075936c9388c8e12738151a753a
parent2651627189ba8b35949580b9a31cc1dde4911f88 (diff)
downloadhakyll-9ad0d38f431c02e848bc675c0ff9f582d49c5e32.tar.gz
Added a comment explaining "teaserContext" function.
-rw-r--r--src/Hakyll/Web/Template/Context.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Hakyll/Web/Template/Context.hs b/src/Hakyll/Web/Template/Context.hs
index 7751423..d3c228e 100644
--- a/src/Hakyll/Web/Template/Context.hs
+++ b/src/Hakyll/Web/Template/Context.hs
@@ -92,6 +92,9 @@ defaultContext =
missingField
--------------------------------------------------------------------------------
+-- | A context with "teaser" key which contain a teaser of the item.
+-- The item is loaded from the given snapshot (which should be saved
+-- in the user code before any templates are applied).
teaserContext :: Snapshot -> Context String
teaserContext snapshot = field "teaser" $ \item ->
(needlePrefix teaserSeparator . itemBody) <$>