summaryrefslogtreecommitdiff
path: root/src/Hakyll/Web
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-06-23 15:14:52 +0200
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-06-23 15:19:16 +0200
commit3a4f1d18b418439d9e623f516f694286e49d9764 (patch)
tree83b36faaccfa2bf75f8aac18b30cd2c61aaa101b /src/Hakyll/Web
parentdac77b955c837d6613135d0bda5616b098d6d101 (diff)
downloadhakyll-3a4f1d18b418439d9e623f516f694286e49d9764.tar.gz
Don't cache pageCompilerWithFields
Closes gh-33
Diffstat (limited to 'src/Hakyll/Web')
-rw-r--r--src/Hakyll/Web/Page.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Hakyll/Web/Page.hs b/src/Hakyll/Web/Page.hs
index b7cf6fb..6e24153 100644
--- a/src/Hakyll/Web/Page.hs
+++ b/src/Hakyll/Web/Page.hs
@@ -109,8 +109,12 @@ pageCompilerWith state options = pageCompilerWithPandoc state options id
pageCompilerWithPandoc :: ParserState -> WriterOptions
-> (Pandoc -> Pandoc)
-> Compiler Resource (Page String)
-pageCompilerWithPandoc state options f =
- pageCompilerWithFields state options f id
+pageCompilerWithPandoc state options f = cached cacheName $
+ readPageCompiler >>> addDefaultFields >>> arr applySelf
+ >>> pageReadPandocWith state
+ >>> arr (fmap (writePandocWith options . f))
+ where
+ cacheName = "Hakyll.Web.Page.pageCompilerWithPandoc"
-- | This is another, even more advanced version of 'pageCompilerWithPandoc'.
-- This function allows you to provide an arrow which is applied before the
@@ -121,12 +125,10 @@ pageCompilerWithFields :: ParserState -> WriterOptions
-> (Pandoc -> Pandoc)
-> Compiler (Page String) (Page String)
-> Compiler Resource (Page String)
-pageCompilerWithFields state options f g = cached cacheName $
+pageCompilerWithFields state options f g =
readPageCompiler >>> addDefaultFields >>> g >>> arr applySelf
>>> pageReadPandocWith state
>>> arr (fmap (writePandocWith options . f))
- where
- cacheName = "Hakyll.Web.Page.pageCompilerWithFields"
-- | Add a number of default metadata fields to a page. These fields include:
--