on master help sign in
Minor changes in Page haddocks
44fc490Jasper Van der Jeugt
src/Hakyll/Core/Compiler.hs+1−1
@@ -230,7 +230,7 @@ getDependency id' = CompilerM $ do
230 Found x -> return x
230 Found x -> return x
231 where
231 where
232 notFound =
232 notFound =
233− "Hakyll.Core.Compiler.getDependency: " ++ show id' ++ " was "
233+ "Hakyll.Core.Compiler.getDependency: " ++ show id' ++ " was " ++
234 "not found in the cache, the cache might be corrupted or " ++
234 "not found in the cache, the cache might be corrupted or " ++
235 "the item you are referring to might not exist"
235 "the item you are referring to might not exist"
236 wrongType e r =
236 wrongType e r =
src/Hakyll/Web/Page.hs+6−3
@@ -3,13 +3,16 @@
3-- A page is an important concept in Hakyll. It is a key-value mapping, and has
3-- A page is an important concept in Hakyll. It is a key-value mapping, and has
4-- one field with an arbitrary type. A 'Page' thus consists of
4-- one field with an arbitrary type. A 'Page' thus consists of
5--
5--
6−-- * a key-value mapping (of the type @Map String String@);
6+-- * metadata (of the type @Map String String@);
7--
7--
8−-- * a value (of the type @a@).
8+-- * the actual value (of the type @a@).
9--
9--
10-- Usually, the value will be a 'String' as well, and the value will be the body
10-- Usually, the value will be a 'String' as well, and the value will be the body
11-- of the page.
11-- of the page.
12--
12--
13+-- However, this is certainly no restriction. For example, @Page ByteString@
14+-- could be used to represent a binary item (e.g. an image) and some metadata.
15+--
13-- Pages can be constructed using Haskell, but they are usually parsed from a
16-- Pages can be constructed using Haskell, but they are usually parsed from a
14-- file. The file format for pages is pretty straightforward.
17-- file. The file format for pages is pretty straightforward.
15--
18--
@@ -18,7 +21,7 @@
18--
21--
19-- This is a valid page with two lines. If we load this in Hakyll, there would
22-- This is a valid page with two lines. If we load this in Hakyll, there would
20-- be no metadata, and the body would be the given text. Let's look at a page
23-- be no metadata, and the body would be the given text. Let's look at a page
21−-- with some metadata.
24+-- with some metadata:
22--
25--
23-- > ---
26-- > ---
24-- > title: Alice's Adventures in Wonderland
27-- > title: Alice's Adventures in Wonderland