@@ -7,7 +7,7 @@ module Text.Hakyll.Renderables
77 , createPagePath
88 , CombinedRenderable
99 , combine
10− , combineWithURL
10+ , combineWithUrl
1111 ) where
1212
1313import qualified Data.Map as M
@@ -25,7 +25,7 @@ import Text.Hakyll.Render
2525
2626-- | A custom page.
2727data CustomPage = CustomPage
28− { customPageURL :: String,
28+ { customPageUrl :: String,
2929 customPageDependencies :: [FilePath],
3030 customPageContext :: [(String, Either String (Hakyll String))]
3131 }
@@ -85,11 +85,11 @@ createListingWith manipulation url template renderables additional =
8585
8686instance Renderable CustomPage where
8787 getDependencies = customPageDependencies
88− getURL = customPageURL
88+ getUrl = customPageUrl
8989 toContext page = do
9090 values <- mapM (either return id . snd) (customPageContext page)
9191 let pairs = zip (map fst $ customPageContext page) values
92− return $ M.fromList $ ("url", customPageURL page) : pairs
92+ return $ M.fromList $ ("url", customPageUrl page) : pairs
9393
9494-- | PagePath is a class that wraps a FilePath. This is used to render Pages
9595-- without reading them first through use of caching.
@@ -102,7 +102,7 @@ createPagePath = PagePath
102102-- We can render filepaths
103103instance Renderable PagePath where
104104 getDependencies (PagePath path) = return path
105− getURL (PagePath path) = toURL path
105+ getUrl (PagePath path) = toUrl path
106106 toContext (PagePath path) = readPage path >>= toContext
107107
108108-- We can serialize filepaths
@@ -112,7 +112,7 @@ instance Binary PagePath where
112112
113113-- | A combination of two other renderables.
114114data CombinedRenderable a b = CombinedRenderable a b
115− | CombinedRenderableWithURL FilePath a b
115+ | CombinedRenderableWithUrl FilePath a b
116116
117117-- | Combine two renderables. The url will always be taken from the first
118118-- @Renderable@. Also, if a `$key` is present in both renderables, the
@@ -125,12 +125,12 @@ combine = CombinedRenderable
125125
126126-- | Combine two renderables and set a custom URL. This behaves like @combine@,
127127-- except that for the @url@ field, the given URL is always chosen.
128−combineWithURL :: (Renderable a, Renderable b)
128+combineWithUrl :: (Renderable a, Renderable b)
129129 => FilePath
130130 -> a
131131 -> b
132132 -> CombinedRenderable a b
133−combineWithURL = CombinedRenderableWithURL
133+combineWithUrl = CombinedRenderableWithUrl
134134
135135-- Render combinations.
136136instance (Renderable a, Renderable b)
@@ -139,18 +139,18 @@ instance (Renderable a, Renderable b)
139139 -- Add the dependencies.
140140 getDependencies (CombinedRenderable a b) =
141141 getDependencies a ++ getDependencies b
142− getDependencies (CombinedRenderableWithURL _ a b) =
142+ getDependencies (CombinedRenderableWithUrl _ a b) =
143143 getDependencies a ++ getDependencies b
144144
145145 -- Take the url from the first renderable, or the specified URL.
146− getURL (CombinedRenderable a _) = getURL a
147− getURL (CombinedRenderableWithURL url _ _) = url
146+ getUrl (CombinedRenderable a _) = getUrl a
147+ getUrl (CombinedRenderableWithUrl url _ _) = url
148148
149149 -- Take a union of the contexts.
150150 toContext (CombinedRenderable a b) = do
151151 c1 <- toContext a
152152 c2 <- toContext b
153153 return $ c1 `M.union` c2
154− toContext (CombinedRenderableWithURL url a b) = do
154+ toContext (CombinedRenderableWithUrl url a b) = do
155155 c <- toContext (CombinedRenderable a b)
156156 return $ M.singleton "url" url `M.union` c