diff options
-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) <$> |