@@ -1,3 +1,46 @@
1+-- | This module provides means for reading and applying 'Template's.
2+--
3+-- Templates are tools to convert data (pages) into a string. They are
4+-- perfectly suited for laying out your site.
5+--
6+-- Let's look at an example template:
7+--
8+-- > <html>
9+-- > <head>
10+-- > <title>My crazy homepage - $title$</title>
11+-- > </head>
12+-- > <body>
13+-- > <div id="header">
14+-- > <h1>My crazy homepage - $title$</h1>
15+-- > </div>
16+-- > <div id="content">
17+-- > $body$
18+-- > </div>
19+-- > <div id="footer">
20+-- > By reading this you agree that I now own your soul
21+-- > </div>
22+-- > </body>
23+-- > </html>
24+--
25+-- We can use this template to render a 'Page' which has a body and a @$title$@
26+-- metadata field.
27+--
28+-- As you can see, the format is very simple -- @$key$@ is used to render the
29+-- @$key$@ field from the page, everything else is literally copied. If you want
30+-- to literally insert @\"$key$\"@ into your page (for example, when you're
31+-- writing a Hakyll tutorial) you can use
32+--
33+-- > <p>
34+-- > A literal $$key$$.
35+-- > </p>
36+--
37+-- Because of it's simplicity, these templates can be used for more than HTML:
38+-- you could make, for example, CSS or JS templates as well.
39+--
40+-- In addition to the native format, Hakyll also supports hamlet templates. For
41+-- more information on hamlet templates, please refer to:
42+-- <http://hackage.haskell.org/package/hamlet>.
43+--
144module Hakyll.Web.Template
245 ( Template
346 , applyTemplate