on master help sign in
More Identifier documentation
1e0c875Jasper Van der Jeugt
examples/hakyll/tutorial.markdown+4−1
@@ -109,7 +109,10 @@ items it matches -- and matching is done using the `"css/*"` [pattern].
109example, `css/screen.css` will be routed to `css/screen.css` -- not very
109example, `css/screen.css` will be routed to `css/screen.css` -- not very
110exciting.
110exciting.
111
111
112−[pattern]: TODO: link
112+Note that a [pattern] matches [identifiers], it doesn't match filenames.
113+
114+[pattern]: /reference/Hakyll-Core-Identifier-Pattern.html
115+[identifiers]: /reference/Hakyll-Core-Identifier.html
113
116
114~~~~~{.haskell}
117~~~~~{.haskell}
115route "css/*" idRoute
118route "css/*" idRoute
src/Hakyll/Core/Identifier.hs+10
@@ -10,6 +10,16 @@
10--
10--
11-- * @error/404@
11-- * @error/404@
12--
12--
13+-- The most important difference between an 'Identifier' and a file path is that
14+-- the identifier for an item is not necesserily the file path.
15+--
16+-- For example, we could have an @index@ identifier, generated by Hakyll. The
17+-- actual file path would be @index.html@, but we identify it using @index@.
18+--
19+-- @posts/foo.markdown@ could be an identifier of an item that is rendered to
20+-- @posts/foo.html@. In this case, the identifier is the name of the source
21+-- file of the page.
22+--
13{-# LANGUAGE GeneralizedNewtypeDeriving #-}
23{-# LANGUAGE GeneralizedNewtypeDeriving #-}
14module Hakyll.Core.Identifier
24module Hakyll.Core.Identifier
15 ( Identifier (..)
25 ( Identifier (..)