summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Hakyll/Web/Template/Context.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Hakyll/Web/Template/Context.hs b/src/Hakyll/Web/Template/Context.hs
index 7751423..74c2e8d 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) <$>
@@ -100,7 +103,7 @@ teaserContext snapshot = field "teaser" $ \item ->
--------------------------------------------------------------------------------
teaserSeparator :: String
-teaserSeparator = "<!-- teaser_end -->"
+teaserSeparator = "<!--more-->"
--------------------------------------------------------------------------------