on master help sign in
Again an url mistake, now the simpleblog works too.
commit66ad9ce7f28750034b830def8741c72cf1b54215 authorJasper Van der Jeugt <jaspervdj@gmail.com> dateThu 4 Mar 2010, 22:45 (17 years ago) parent6b4b806
3 files changed+6−7
src/Text/Hakyll/Render.hs+1−1 src/Text/Hakyll/RenderAction.hs+2−3 src/Text/Hakyll/Renderables.hs+3−3
src/Text/Hakyll/Render.hs+1−1
@@ -89,7 +89,7 @@ renderAndConcatWith manipulation templatePaths renderables = RenderAction
8989 renders = map (>>> manipulationAction >>> render') renderables
9090 manipulationAction = createManipulationAction manipulation
9191
92− actionFunction' = \_ -> do
92+ actionFunction' _ = do
9393 contexts <- mapM runRenderAction renders
9494 return $ concatMap (fromMaybe "" . M.lookup "body") contexts
9595
src/Text/Hakyll/RenderAction.hs+2−3
@@ -28,7 +28,7 @@ createRenderAction f = RenderAction
2828 }
2929
3030createSimpleRenderAction :: Hakyll b -> RenderAction () b
31−createSimpleRenderAction x = createRenderAction (const x)
31+createSimpleRenderAction = createRenderAction . const
3232
3333instance Category RenderAction where
3434 id = RenderAction
@@ -44,8 +44,7 @@ instance Category RenderAction where
4444 }
4545
4646createManipulationAction :: ContextManipulation -> RenderAction Context Context
47−createManipulationAction manipulation =
48− createRenderAction (return . manipulation)
47+createManipulationAction = createRenderAction . (return .)
4948
5049chain :: [RenderAction a a] -> RenderAction a a
5150chain = foldl1 (>>>)
src/Text/Hakyll/Renderables.hs+3−3
@@ -40,7 +40,7 @@ createCustomPage url dependencies association = RenderAction
4040 where
4141 mtuple (a, b) = b >>= \b' -> return (a, b')
4242 toHakyllString = second (either return runRenderAction)
43− assoc' = mapM (mtuple . toHakyllString) association
43+ assoc' = mapM (mtuple . toHakyllString) $ ("url", Left url) : association
4444
4545-- | A @createCustomPage@ function specialized in creating listings.
4646--
@@ -110,7 +110,7 @@ combine x y = RenderAction
110110 { actionDependencies = actionDependencies x ++ actionDependencies y
111111 , actionUrl = actionUrl x `mplus` actionUrl y
112112 , actionFunction = \_ ->
113− liftM2 (M.union) (runRenderAction x) (runRenderAction y)
113+ liftM2 M.union (runRenderAction x) (runRenderAction y)
114114 }
115115
116116-- | Combine two renderables and set a custom URL. This behaves like @combine@,
@@ -122,7 +122,7 @@ combineWithUrl :: FilePath
122122combineWithUrl url x y = combine'
123123 { actionUrl = Just $ return url
124124 , actionFunction = \_ ->
125− (M.insert "url" url) <$> runRenderAction combine'
125+ M.insert "url" url <$> runRenderAction combine'
126126 }
127127 where
128128 combine' = combine x y