summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorFabian Schläpfer <fschlaepfer@users.noreply.github.com>2018-05-29 18:44:25 +0200
committerJasper Van der Jeugt <jaspervdj@gmail.com>2018-05-29 20:08:53 +0200
commit8074252d0cfd3610d03908513eed8c4b0cd2f598 (patch)
treeb1e5ea16c324dae3e8b23fe14c010fb64483dba9 /web
parent1ff0cf45efc306c230a862ae4f2c613138eeadd5 (diff)
downloadhakyll-8074252d0cfd3610d03908513eed8c4b0cd2f598.tar.gz
Update tutorial for YAML object metadata
Since version 4.8 `Metadata` is no longer a Map but a YAML object. (see #225) The compilers tutorial is adapted to use `lookupString` instead of `Map.lookup`.
Diffstat (limited to 'web')
-rw-r--r--web/tutorials/04-compilers.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/tutorials/04-compilers.markdown b/web/tutorials/04-compilers.markdown
index a1fca37..b6b1c3c 100644
--- a/web/tutorials/04-compilers.markdown
+++ b/web/tutorials/04-compilers.markdown
@@ -92,7 +92,7 @@ And `$title$` like this:
titleContext :: Context a
titleContext = field "title" $ \item -> do
metadata <- getMetadata (itemIdentifier item)
- return $ fromMaybe "No title" $ M.lookup "title" metadata
+ return $ fromMaybe "No title" $ lookupString "title" metadata
```
And compose them using the `Monoid` instance: