From 9ad0d38f431c02e848bc675c0ff9f582d49c5e32 Mon Sep 17 00:00:00 2001 From: "Ivan N. Veselov" Date: Sat, 4 May 2013 17:48:37 +0300 Subject: Added a comment explaining "teaserContext" function. --- src/Hakyll/Web/Template/Context.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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) <$> -- cgit v1.2.3 From 0e6441885c8a1567b688e0fa83fd84d59f079af2 Mon Sep 17 00:00:00 2001 From: "Ivan N. Veselov" Date: Sat, 4 May 2013 17:57:51 +0300 Subject: Changed the teaser separator to "more" to use the same format as WordPress does. --- src/Hakyll/Web/Template/Context.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Hakyll/Web/Template/Context.hs b/src/Hakyll/Web/Template/Context.hs index d3c228e..74c2e8d 100644 --- a/src/Hakyll/Web/Template/Context.hs +++ b/src/Hakyll/Web/Template/Context.hs @@ -103,7 +103,7 @@ teaserContext snapshot = field "teaser" $ \item -> -------------------------------------------------------------------------------- teaserSeparator :: String -teaserSeparator = "" +teaserSeparator = "" -------------------------------------------------------------------------------- -- cgit v1.2.3