diff options
Diffstat (limited to 'src/Text/Hakyll/Renderables.hs')
-rw-r--r-- | src/Text/Hakyll/Renderables.hs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Text/Hakyll/Renderables.hs b/src/Text/Hakyll/Renderables.hs index 26d1e86..0151f10 100644 --- a/src/Text/Hakyll/Renderables.hs +++ b/src/Text/Hakyll/Renderables.hs @@ -5,8 +5,9 @@ module Text.Hakyll.Renderables , createPagePath ) where -import System.FilePath (FilePath) import qualified Data.Map as M + +import Text.Hakyll.Hakyll (Hakyll) import Text.Hakyll.Page import Text.Hakyll.Renderable import Text.Hakyll.File @@ -15,13 +16,19 @@ import Text.Hakyll.File data CustomPage = CustomPage { url :: String, dependencies :: [FilePath], - mapping :: [(String, Either String (IO String))] + mapping :: [(String, Either String (Hakyll String))] } -- | Create a custom page. +-- +-- The association list given maps keys to values for substitution. Note +-- that as value, you can either give a @String@ or a @Hakyll String@. +-- A @Hakyll String@ is preferred for more complex data, since it allows +-- dependency checking. A @String@ is obviously more simple to use in some +-- cases. createCustomPage :: String -- ^ Destination of the page, relative to _site. -> [FilePath] -- ^ Dependencies of the page. - -> [(String, Either String (IO String))] -- ^ Key - value mapping for rendering. + -> [(String, Either String (Hakyll String))] -- ^ Mapping. -> CustomPage createCustomPage = CustomPage |