diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-02-26 11:07:46 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-02-26 11:07:46 +0100 |
commit | b73fc8e831806abf6432e5e443834e94c70dd4e7 (patch) | |
tree | 0ad223e0f6ea8754667ebbdc6de0ff147e7537c6 /examples | |
parent | c89cfdb456deda5a81b52d9e8516d635e82f70d8 (diff) | |
download | hakyll-b73fc8e831806abf6432e5e443834e94c70dd4e7.tar.gz |
Add some more information on metacompilation
Diffstat (limited to 'examples')
-rw-r--r-- | examples/hakyll/tutorial.markdown | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/hakyll/tutorial.markdown b/examples/hakyll/tutorial.markdown index 4596739..642c4f2 100644 --- a/examples/hakyll/tutorial.markdown +++ b/examples/hakyll/tutorial.markdown @@ -150,7 +150,8 @@ later[^1]. template compile rule at the bottom -- this would make no difference. Now, it's time to actually render our pages. We use the `forM_` monad combinator -so we can describe all files at once. +so we can describe all files at once (instead of compiling all three files +manually). ~~~~~{.haskell} forM_ ["about.rst", "index.markdown", "code.lhs"] $ \page -> do @@ -170,7 +171,7 @@ DSL there. The gist of it is that the `Compiler a b` type has two parameters -- it is an Arrow, and we can chain compilers using the `>>>` operator. The [compiler] -reference page has some more information on this subject. +reference page has some more readable information on this subject. [compiler]: /reference/Hakyll-Core-Compiler.html @@ -179,3 +180,8 @@ compile page $ pageCompiler >>> applyTemplateCompiler "templates/default.html" >>> relativizeUrlsCompiler ~~~~~ + +Note that we can only use `applyTemplateCompiler` with +`"templates/default.html"` because we compiled `"templates/default.html"`. If we +didn't list a rule for that item, the compilation would fail (Hakyll would not +know what `"templates/default.html"` is!). |