@@ -61,10 +61,10 @@ it will generate a very nice main function.
63An important concept in Hakyll is Pages. Pages are text files that can be
63An important concept in Hakyll is Pages. Pages are text files that can be
64+written in markdown, html, rst... basically anything Pandoc supports.
64−written in markdown, html or TeX. Furthermore, they can also contain some
65+Furthermore, they can also contain some metadata. The metadata is placed in the
65−metadata. The metadata is placed in the file header and surrouded by `---`
66+file header and surrouded by `---` lines. Each line should contain a
66−lines. Each line should contain a `key: value` pair. Let's have a look at the
67+`key: value` pair. Let's have a look at the `index.markdown` page.
67−`about.markdown` page.
70 title: About
70 title: About
@@ -91,13 +91,15 @@ html files) containing a number of keys. The syntax for these keys is
91 <title>MyAweSomeCompany - $title</title>
91 <title>MyAweSomeCompany - $title</title>
92 <link rel="stylesheet" type="text/css"
92 <link rel="stylesheet" type="text/css"
93 href="$$root/css/default.css" />
93 href="$$root/css/default.css" />
94+ <link rel="stylesheet" type="text/css"
95+ href="$$root/css/syntax.css" />
96 <h1>MyAweSomeCompany - $title</h1>
98 <h1>MyAweSomeCompany - $title</h1>
97 <div id="navigation">
99 <div id="navigation">
98 <a href="$$root/index.html">Home</a>
100 <a href="$$root/index.html">Home</a>
99 <a href="$$root/about.html">About</a>
101 <a href="$$root/about.html">About</a>
100− <a href="$$root/products.html">Products</a>
102+ <a href="$$root/code.html">Code</a>
@@ -135,7 +137,7 @@ import Text.Hakyll.Render (renderChain)
135import Text.Hakyll.Renderables (createPagePath)
137import Text.Hakyll.Renderables (createPagePath)
136main = hakyll $ do
138main = hakyll $ do
137 renderChain ["templates/default.html"]
139 renderChain ["templates/default.html"]
138− (createPagePath "about.markdown")
140+ (createPagePath "index.markdown")
141Or, to render all our three pages:
143Or, to render all our three pages:
@@ -145,19 +147,20 @@ import Text.Hakyll (hakyll)
145import Text.Hakyll.Render (renderChain)
147import Text.Hakyll.Render (renderChain)
146import Text.Hakyll.Renderables (createPagePath)
148import Text.Hakyll.Renderables (createPagePath)
147main = hakyll $ do
149main = hakyll $ do
148− render "about.markdown"
150+ render "about.rst"
149 render "index.markdown"
151 render "index.markdown"
150− render "products.markdown"
152+ render "code.lhs"
151 where render = renderChain ["templates/default.html"]
153 where render = renderChain ["templates/default.html"]
152 . createPagePath
154 . createPagePath
157+As you can see, we can render a variety of formats. This will create the
155−This will create the following files:
158+following files:
158_site/about.html
161_site/about.html
159_site/index.html
162_site/index.html
160−_site/products.html
163+_site/code.html
163## CSS, images and other static files
166## CSS, images and other static files