summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-03-30 19:36:41 +0200
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-03-30 19:36:41 +0200
commitd108263907209e2063dbfe46b071b0308b5852c7 (patch)
treef0ba34fc1e2bc861eccda4475e7eeab293f9d4d3 /examples
parent622c259708503eb9eb766fe0b00c28b979e2e653 (diff)
downloadhakyll-d108263907209e2063dbfe46b071b0308b5852c7.tar.gz
Added "helping out" section to tutorials.
We really need more feedback on the turorials, so we can adapt them to the needs of the readers.
Diffstat (limited to 'examples')
-rw-r--r--examples/hakyll/hakyll.hs24
-rw-r--r--examples/hakyll/templates/tutorial.html10
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!