on master help sign in
Update tutorial draft
commit768b180176f95b6f28a2ae3cd273dc7af1e33e33 authorJasper Van der Jeugt <jaspervdj@gmail.com> dateWed 23 Feb 2011, 13:58 (16 years ago) parent4586e7b
1 file changed+11−11
examples/hakyll/tutorial.markdown+11−11
examples/hakyll/tutorial.markdown+11−11
@@ -66,15 +66,15 @@ import Hakyll
6666main :: IO ()
6767main = hakyll $ do
6868 route "css/*" idRoute
69− compile "css/*" defaultCompressCss
69+ compile "css/*" compressCssCompiler
7070
71− compile "templates/*" defaultTemplateRead
71+ compile "templates/*" templateCompiler
7272
7373 forM_ ["about.rst", "index.markdown", "code.lhs"] $ \page -> do
7474 route page $ setExtension "html"
75− compile page $ defaultPageRead
76− >>> defaultApplyTemplate "templates/default.html"
77− >>> defaultRelativizeUrls
75+ compile page $ readPageCompiler
76+ >>> applyTemplateCompiler "templates/default.html"
77+ >>> relativizeUrlsCompiler
7878~~~~~
7979
8080This is enough code to create a small brochure site! You can find all code
@@ -122,11 +122,11 @@ Apart from specifying where the items should go (using `route`), we also have to
122122specify *how* the need to be compiled. This is done using the `compile`
123123function. As second argument, it takes a `Compiler`. These compilers can consist
124124of very complicated constructions, but Hakyll also provides a number of good
125−default compilers. The `defaultCompressCss` compiler will simply compress the
125+default compilers. The `compressCssCompiler` compiler will simply compress the
126126CSS found in the files.
127127
128128~~~~~{.haskell}
129−compile "css/*" defaultCompressCss
129+compile "css/*" compressCssCompiler
130130~~~~~
131131
132132Next, we're going to render some pages. We're going to style the results a
@@ -139,7 +139,7 @@ We don't use a route for these templates, after all, we don't want to route them
139139anywhere, we just want to use them to style our pages a little.
140140
141141~~~~~{.haskell}
142−compile "templates/*" defaultTemplateRead
142+compile "templates/*" templateCompiler
143143~~~~~
144144
145145We can conclude that some rules do not *directly* add an output page on our
@@ -175,7 +175,7 @@ reference page has some more information on this subject.
175175[compiler]: /reference/Hakyll-Core-Compiler.html
176176
177177~~~~~{.haskell}
178−compile page $ defaultPageRead
179− >>> defaultApplyTemplate "templates/default.html"
180− >>> defaultRelativizeUrls
178+compile page $ pageCompiler
179+ >>> applyTemplateCompiler "templates/default.html"
180+ >>> relativizeUrlsCompiler
181181~~~~~