diff options
Diffstat (limited to 'src/Text/Hakyll/Renderables.hs')
-rw-r--r-- | src/Text/Hakyll/Renderables.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Text/Hakyll/Renderables.hs b/src/Text/Hakyll/Renderables.hs index 85b6fdd..fef88e6 100644 --- a/src/Text/Hakyll/Renderables.hs +++ b/src/Text/Hakyll/Renderables.hs @@ -12,6 +12,9 @@ module Text.Hakyll.Renderables import qualified Data.Map as M import Control.Arrow (second) +import Control.Monad (liftM) + +import Data.Binary import Text.Hakyll.Hakyll (Hakyll) import Text.Hakyll.Page @@ -95,6 +98,11 @@ instance Renderable PagePath where getURL (PagePath path) = toURL path toContext (PagePath path) = readPage path >>= toContext +-- We can serialize filepaths +instance Binary PagePath where + put (PagePath path) = put path + get = liftM PagePath get + -- | A combination of two other renderables. data CombinedRenderable a b = CombinedRenderable a b | CombinedRenderableWithURL FilePath a b |