on master help sign in
Added "Why renderChain" section, fixed some typos.
dabfc43Jasper Van der Jeugt
examples/hakyll/tutorials/part01.markdown+2−2
@@ -60,7 +60,7 @@ main = hakyll "http://example.com" $ do
60 liftIO $ putStrLn "I'm in your computer, generating your site!"
60 liftIO $ putStrLn "I'm in your computer, generating your site!"
61~~~~~
61~~~~~
62
62
63−Note how we wrap everyting in the `hakyll` function. This is useful because
63+Note how we wrap everything in the `hakyll` function. This is useful because
64it will generate a very nice main function. We also pass the full site URL to
64it will generate a very nice main function. We also pass the full site URL to
65the `hakyll` function. If you don't have an URL for your site yet, it doesn't
65the `hakyll` function. If you don't have an URL for your site yet, it doesn't
66really matter for now; just fill in anything then. The URL is only used for
66really matter for now; just fill in anything then. The URL is only used for
@@ -83,7 +83,7 @@ One way to write such a `Context`, is a page.
83Another important concept in Hakyll is pages. Pages are text files that can be
83Another important concept in Hakyll is pages. Pages are text files that can be
84written in markdown, html, rst... basically anything Pandoc supports.
84written in markdown, html, rst... basically anything Pandoc supports.
85Furthermore, they can also contain some metadata. The metadata is placed in the
85Furthermore, they can also contain some metadata. The metadata is placed in the
86−file header and surrouded by `---` lines. Each line should contain a
86+file header and surrounded by `---` lines. Each line should contain a
87`key: value` pair. Let's have a look at the `index.markdown` page.
87`key: value` pair. Let's have a look at the `index.markdown` page.
88
88
89 ---
89 ---
examples/hakyll/tutorials/part02.markdown+8
@@ -76,8 +76,16 @@ our functions when it is really needed. In this particular case, `test` would
76only be executed if either `test.markdown` or `template.html` were recently
76only be executed if either `test.markdown` or `template.html` were recently
77changed.
77changed.
78
78
79+## So what's renderChain then?
80+
81+Now, we have done pretty much the same as we did with the `renderChain` function
82+in the first part. That's right, the `renderChain` is more or less implemented
83+like this. So, you will probably use `renderChain` in most cases, but it's
84+handy if you know how it works.
85+
79## The gist of it
86## The gist of it
80
87
81- Arrows really aren't complicated.
88- Arrows really aren't complicated.
82- Compose them using `>>>`.
89- Compose them using `>>>`.
83- `HakyllAction` tracks dependencies for you. Use it.
90- `HakyllAction` tracks dependencies for you. Use it.
91+- In most cases, you will just use `renderChain`.