diff options
author | Ivan N. Veselov <veselov@gmail.com> | 2013-05-04 17:48:37 +0300 |
---|---|---|
committer | Ivan N. Veselov <veselov@gmail.com> | 2013-05-04 17:48:51 +0300 |
commit | 9ad0d38f431c02e848bc675c0ff9f582d49c5e32 (patch) | |
tree | 707adf972ef4a075936c9388c8e12738151a753a /src | |
parent | 2651627189ba8b35949580b9a31cc1dde4911f88 (diff) | |
download | hakyll-9ad0d38f431c02e848bc675c0ff9f582d49c5e32.tar.gz |
Added a comment explaining "teaserContext" function.
Diffstat (limited to 'src')
-rw-r--r-- | src/Hakyll/Web/Template/Context.hs | 3 |
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) <$> |