diff options
| author | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-12-16 00:21:59 +0100 |
|---|---|---|
| committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-12-16 00:21:59 +0100 |
| commit | 8a8dade15ffc84f543fc3774f7a0a8fac4835bd2 (patch) | |
| tree | f93374db2530ded5f24b8eb13408a0f9a6726ba3 /web/tutorials/03-compilers.markdown | |
| parent | 9b081b60a26a58aad890252cd561ddc1a5a34385 (diff) | |
| download | hakyll-8a8dade15ffc84f543fc3774f7a0a8fac4835bd2.tar.gz | |
Better tutorial structure
Diffstat (limited to 'web/tutorials/03-compilers.markdown')
| -rw-r--r-- | web/tutorials/03-compilers.markdown | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/web/tutorials/03-compilers.markdown b/web/tutorials/03-compilers.markdown deleted file mode 100644 index 953464f..0000000 --- a/web/tutorials/03-compilers.markdown +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: More on compilers: load, and templates -author: Jasper Van der Jeugt ---- - -Loading items -------------- - -The compiler Monad is a complex beast, but this is nicely hidden for the user of -the Hakyll library. - -Suppose that you're generating `index.html` which shows your latest brilliant -blogpost. This requires `posts/foo.markdown` to be generated *before* -`index.html` (so we don't have to generate it twice). But you don't have to care -about all of that: Hakyll will sort this out this out for you automatically! - -Let's see some quick examples. We can load a specific item: - -```haskell -load "posts/foo.markdown" :: Compiler (Item String) -``` - -Or a whole bunch of them: - -```haskell -loadAll "posts/*" :: Compiler [Item String] -``` - -Sometimes you just want the *contents* and not the `Item`: - -```haskell -loadBody "posts/foo.markdown" :: Compiler String -``` |
