diff options
-rw-r--r-- | examples/hakyll/hakyll.hs | 24 | ||||
-rw-r--r-- | examples/hakyll/templates/tutorial.html | 10 |
2 files changed, 25 insertions, 9 deletions
diff --git a/examples/hakyll/hakyll.hs b/examples/hakyll/hakyll.hs index 53b9a4b..6c26977 100644 --- a/examples/hakyll/hakyll.hs +++ b/examples/hakyll/hakyll.hs @@ -5,7 +5,7 @@ import Text.Hakyll.File import Text.Hakyll.Regex import Control.Monad.Reader (liftIO) import System.Directory -import Control.Monad (mapM_, liftM) +import Control.Monad (mapM_, forM_, liftM) import Data.List (sort) main = hakyll "http://jaspervdj.be/hakyll" $ do @@ -19,16 +19,22 @@ main = hakyll "http://jaspervdj.be/hakyll" $ do ["templates/tutorialitem.html"] (map createPage tutorials) [("title", Left "Tutorials")] - renderChain ["templates/tutorials.html", "templates/default.html"] $ withSidebar tutorialPage + renderChain ["templates/tutorials.html", "templates/default.html"] + (withSidebar tutorialPage) - mapM_ render' $ [ "about.markdown" - , "index.markdown" - , "philosophy.markdown" - , "reference.markdown" - , "changelog.markdown" - ] ++ tutorials + mapM_ (render' ["templates/default.html"]) $ + [ "about.markdown" + , "index.markdown" + , "philosophy.markdown" + , "reference.markdown" + , "changelog.markdown" + ] + + forM_ tutorials $ render' [ "templates/tutorial.html" + , "templates/default.html" + ] where - render' = renderChain ["templates/default.html"] . withSidebar . createPage + render' templates = renderChain templates . withSidebar . createPage withSidebar a = a `combine` createPage "sidebar.markdown" diff --git a/examples/hakyll/templates/tutorial.html b/examples/hakyll/templates/tutorial.html new file mode 100644 index 0000000..6ce60b6 --- /dev/null +++ b/examples/hakyll/templates/tutorial.html @@ -0,0 +1,10 @@ +$body + +<h2>Helping out</h2> + +Hakyll is an open source project, and one of the hardest parts is writing +correct, up-to-date, and understandable documentation. Therefore, the +authors would really appreciate it if you would +<a href="http://groups.google.com/group/hakyll">give some feedback</a> about +the tutorials, and especially report errors or difficulties you encountered. +Thanks! |