@@ -85,7 +85,7 @@ createListingWith manipulation url template renderables additional =
86instance Renderable CustomPage where
86instance Renderable CustomPage where
87 getDependencies = customPageDependencies
87 getDependencies = customPageDependencies
88− getUrl = customPageUrl
88+ getUrl = return . customPageUrl
89 toContext page = do
89 toContext page = do
90 values <- mapM (either return id . snd) (customPageContext page)
90 values <- mapM (either return id . snd) (customPageContext page)
91 let pairs = zip (map fst $ customPageContext page) values
91 let pairs = zip (map fst $ customPageContext page) values
@@ -94,6 +94,7 @@ instance Renderable CustomPage where
94-- | PagePath is a class that wraps a FilePath. This is used to render Pages
94-- | PagePath is a class that wraps a FilePath. This is used to render Pages
95-- without reading them first through use of caching.
95-- without reading them first through use of caching.
96data PagePath = PagePath FilePath
96data PagePath = PagePath FilePath
97+ deriving (Ord, Eq, Read, Show)
98-- | Create a PagePath from a FilePath.
99-- | Create a PagePath from a FilePath.
99createPagePath :: FilePath -> PagePath
100createPagePath :: FilePath -> PagePath
@@ -113,6 +114,7 @@ instance Binary PagePath where
113-- | A combination of two other renderables.
114-- | A combination of two other renderables.
114data CombinedRenderable a b = CombinedRenderable a b
115data CombinedRenderable a b = CombinedRenderable a b
115 | CombinedRenderableWithUrl FilePath a b
116 | CombinedRenderableWithUrl FilePath a b
117+ deriving (Ord, Eq, Read, Show)
117-- | Combine two renderables. The url will always be taken from the first
119-- | Combine two renderables. The url will always be taken from the first
118-- @Renderable@. Also, if a `$key` is present in both renderables, the
120-- @Renderable@. Also, if a `$key` is present in both renderables, the
@@ -144,7 +146,7 @@ instance (Renderable a, Renderable b)
145 -- Take the url from the first renderable, or the specified URL.
147 -- Take the url from the first renderable, or the specified URL.
146 getUrl (CombinedRenderable a _) = getUrl a
148 getUrl (CombinedRenderable a _) = getUrl a
147− getUrl (CombinedRenderableWithUrl url _ _) = url
149+ getUrl (CombinedRenderableWithUrl url _ _) = return url
149 -- Take a union of the contexts.
151 -- Take a union of the contexts.
150 toContext (CombinedRenderable a b) = do
152 toContext (CombinedRenderable a b) = do