Fixed type in tutorial.
This commit is contained in:
parent
58766632a3
commit
0c41ea09e7
2 changed files with 5 additions and 5 deletions
|
@ -90,7 +90,7 @@ the end just `key: value` mappings. A CustomPage is created using the
|
|||
~~~~~{.haskell}
|
||||
createCustomPage :: FilePath
|
||||
-> [FilePath]
|
||||
-> [(String, Either String (IO String)]
|
||||
-> [(String, Either String (Hakyll String)]
|
||||
~~~~~
|
||||
|
||||
The first argument is the `url` of the page to generate. For our index page,
|
||||
|
@ -103,11 +103,11 @@ This, once again, is about dependency handling. The idea is that you can choose
|
|||
which type to use for the value:
|
||||
|
||||
- `String`: Simply a `String`.
|
||||
- `IO String`: Here, you can give an arbitrary `IO` action that will result
|
||||
in a String. However - this action _will not be executed_ when the file
|
||||
- `Hakyll String`: Here, you can give an arbitrary `Hakyll` action that will
|
||||
result in a String. However - this action _will not be executed_ when the file
|
||||
in `_site` is up-to-date.
|
||||
|
||||
First, let us define this `IO String` for our index page. We want to render
|
||||
First, let us define this `Hakyll String` for our index page. We want to render
|
||||
every post using a simple template:
|
||||
|
||||
~~~~~{.html}
|
||||
|
|
|
@ -159,7 +159,7 @@ post lists for every tag.
|
|||
Hakyll provides a function called `readTagMap`. Let's inspect it's type.
|
||||
|
||||
~~~~~{.haskell}
|
||||
readTagMap [FilePath] -> IO Map String [FilePath]
|
||||
readTagMap [FilePath] -> Hakyll Map String [FilePath]
|
||||
~~~~~
|
||||
|
||||
You give it a list of paths, and it creates a map that, for every tag, holds
|
||||
|
|
Loading…
Reference in a new issue