on d988921 help sign in
hakyll/src/Text/Hakyll/RenderableFilePath.hs
16 lines 493 B history raw
1module Text.Hakyll.RenderableFilePath
2 ( RenderableFilePath (..)
3 ) where
5import System.FilePath
6import Text.Hakyll.Renderable
7import Text.Hakyll.Util
8import Text.Hakyll.Page
10newtype RenderableFilePath = RenderableFilePath FilePath
12-- We can render filepaths
13instance Renderable RenderableFilePath where
14 getDependencies (RenderableFilePath path) = return path
15 getURL (RenderableFilePath path) = toURL path
16 toContext (RenderableFilePath path) = readPage path >>= toContext