on master help sign in
Added "helping out" section to tutorials.
d108263Jasper Van der Jeugt
examples/hakyll/hakyll.hs+15−9
@@ -5,7 +5,7 @@ import Text.Hakyll.File
5import Text.Hakyll.Regex
5import Text.Hakyll.Regex
6import Control.Monad.Reader (liftIO)
6import Control.Monad.Reader (liftIO)
7import System.Directory
7import System.Directory
8−import Control.Monad (mapM_, liftM)
8+import Control.Monad (mapM_, forM_, liftM)
9import Data.List (sort)
9import Data.List (sort)
10
10
11main = hakyll "http://jaspervdj.be/hakyll" $ do
11main = hakyll "http://jaspervdj.be/hakyll" $ do
@@ -19,16 +19,22 @@ main = hakyll "http://jaspervdj.be/hakyll" $ do
19 ["templates/tutorialitem.html"]
19 ["templates/tutorialitem.html"]
20 (map createPage tutorials)
20 (map createPage tutorials)
21 [("title", Left "Tutorials")]
21 [("title", Left "Tutorials")]
22− renderChain ["templates/tutorials.html", "templates/default.html"] $ withSidebar tutorialPage
22+ renderChain ["templates/tutorials.html", "templates/default.html"]
23+ (withSidebar tutorialPage)
23
24
25+ mapM_ (render' ["templates/default.html"]) $
24− mapM_ render' $ [ "about.markdown"
26+ [ "about.markdown"
25− , "index.markdown"
27+ , "index.markdown"
26− , "philosophy.markdown"
28+ , "philosophy.markdown"
27− , "reference.markdown"
29+ , "reference.markdown"
28− , "changelog.markdown"
30+ , "changelog.markdown"
29− ] ++ tutorials
31+ ]
32+
33+ forM_ tutorials $ render' [ "templates/tutorial.html"
34+ , "templates/default.html"
35+ ]
30
36
31 where
37 where
32− render' = renderChain ["templates/default.html"] . withSidebar . createPage
38+ render' templates = renderChain templates . withSidebar . createPage
33 withSidebar a = a `combine` createPage "sidebar.markdown"
39 withSidebar a = a `combine` createPage "sidebar.markdown"
34
40
examples/hakyll/templates/tutorial.htmlnew file+10
@@ -0,0 +1,10 @@
1+$body
2+
3+<h2>Helping out</h2>
4+
5+Hakyll is an open source project, and one of the hardest parts is writing
6+correct, up-to-date, and understandable documentation. Therefore, the
7+authors would really appreciate it if you would
8+<a href="http://groups.google.com/group/hakyll">give some feedback</a> about
9+the tutorials, and especially report errors or difficulties you encountered.
10+Thanks!