@@ -5,7 +5,7 @@ import Text.Hakyll.File
55import Text.Hakyll.Regex
66import Control.Monad.Reader (liftIO)
77import System.Directory
8−import Control.Monad (mapM_, liftM)
8+import Control.Monad (mapM_, forM_, liftM)
99import Data.List (sort)
1010
1111main = hakyll "http://jaspervdj.be/hakyll" $ do
@@ -19,16 +19,22 @@ main = hakyll "http://jaspervdj.be/hakyll" $ do
1919 ["templates/tutorialitem.html"]
2020 (map createPage tutorials)
2121 [("title", Left "Tutorials")]
22− renderChain ["templates/tutorials.html", "templates/default.html"] $ withSidebar tutorialPage
22+ renderChain ["templates/tutorials.html", "templates/default.html"]
23+ (withSidebar tutorialPage)
2324
24− mapM_ render' $ [ "about.markdown"
25− , "index.markdown"
26− , "philosophy.markdown"
27− , "reference.markdown"
28− , "changelog.markdown"
29− ] ++ tutorials
25+ mapM_ (render' ["templates/default.html"]) $
26+ [ "about.markdown"
27+ , "index.markdown"
28+ , "philosophy.markdown"
29+ , "reference.markdown"
30+ , "changelog.markdown"
31+ ]
32+
33+ forM_ tutorials $ render' [ "templates/tutorial.html"
34+ , "templates/default.html"
35+ ]
3036
3137 where
32− render' = renderChain ["templates/default.html"] . withSidebar . createPage
38+ render' templates = renderChain templates . withSidebar . createPage
3339 withSidebar a = a `combine` createPage "sidebar.markdown"
3440