More Identifier documentation
commit1e0c875d6efd67bda010573fc8bb935eef2ea225
authorJasper Van der Jeugt <jaspervdj@gmail.com>
dateSat 12 Feb 2011, 16:54 (16 years ago)
parentf910233
examples/hakyll/tutorial.markdown+4−1
@@ -109,7 +109,10 @@ items it matches -- and matching is done using the `"css/*"` [pattern].
109109example, `css/screen.css` will be routed to `css/screen.css` -- not very
110110exciting.
111111
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
113116
114117~~~~~{.haskell}
115118route "css/*" idRoute
src/Hakyll/Core/Identifier.hs+10
@@ -10,6 +10,16 @@
1010--
1111-- * @error/404@
1212--
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+--
1323{-# LANGUAGE GeneralizedNewtypeDeriving #-}
1424module Hakyll.Core.Identifier
1525 ( Identifier (..)