diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-24 16:27:43 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-24 16:27:43 +0100 |
commit | aef33d18da6d707579c0dd14b29a1559fc10048e (patch) | |
tree | e622691d3eea1c217b42c70790d4e2c5d726b812 /src/Text/Hakyll/Page.hs | |
parent | d6fbe303ae389d8c0c17b7181cfba2180f404fb4 (diff) | |
download | hakyll-aef33d18da6d707579c0dd14b29a1559fc10048e.tar.gz |
Added Template type (experimental).
Diffstat (limited to 'src/Text/Hakyll/Page.hs')
-rw-r--r-- | src/Text/Hakyll/Page.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Text/Hakyll/Page.hs b/src/Text/Hakyll/Page.hs index 0cf86ee..e522605 100644 --- a/src/Text/Hakyll/Page.hs +++ b/src/Text/Hakyll/Page.hs @@ -13,7 +13,7 @@ import Data.Char (isSpace) import Data.Maybe (fromMaybe) import Control.Monad (liftM) import Control.Monad.Reader (liftIO) -import System.FilePath (takeExtension) +import System.FilePath (takeExtension, (</>)) import Text.Pandoc import Data.Binary @@ -135,11 +135,13 @@ readPageFromFile path = do -- read it from the file given and store it in the cache. readPage :: FilePath -> Hakyll Page readPage path = do - isCacheMoreRecent' <- isCacheMoreRecent path [path] - if isCacheMoreRecent' then getFromCache path + isCacheMoreRecent' <- isCacheMoreRecent fileName [path] + if isCacheMoreRecent' then getFromCache fileName else do page <- readPageFromFile path - storeInCache page path + storeInCache page fileName return page + where + fileName = "pages" </> path -- Make pages renderable. instance Renderable Page where |