diff options
author | Fabian Schläpfer <fschlaepfer@users.noreply.github.com> | 2018-05-29 18:44:25 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2018-05-29 20:08:53 +0200 |
commit | 8074252d0cfd3610d03908513eed8c4b0cd2f598 (patch) | |
tree | b1e5ea16c324dae3e8b23fe14c010fb64483dba9 /web/tutorials | |
parent | 1ff0cf45efc306c230a862ae4f2c613138eeadd5 (diff) | |
download | hakyll-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/tutorials')
-rw-r--r-- | web/tutorials/04-compilers.markdown | 2 |
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: |