@@ -3,52 +3,26 @@ title: The basics
33author: Jasper Van der Jeugt
44---
55
6−## Let's get started!
6+Building and cleaning
7+---------------------
78
8−We're going to discuss a small brochure site to start with. You can find all
9−code and files necessary to build this site
10−[right here](http://github.com/jaspervdj/hakyll-examples/tree/master/brochure)
11−-- feel free to look at them as we go trough the tutorial. To fetch all examples
12−in order to play with them locally, use:
9+If you followed along with the previous tutorial, you should now have the
10+example site up and running. By running `./site build`, you created two
11+directories:
1312
14− git clone git://github.com/jaspervdj/hakyll-examples.git
13+- `_site`, with your site as HTML files, ready to be deployed;
14+- `_cache`, which Hakyll uses internally.
1515
16−or navigate to the download menu on GitHub.
16+`./site clean` removes these directories, and `./site rebuild` performs a
17+`clean` and then a `build`.
1718
18−Now, for this first tutorial, there's a number of files we will use:
19+In general, it's only necessary to use `rebuild` when you made changes to your
20+`site.hs`, and not when you just made changes to the contents of your website.
1921
20− about.rst A simple page written in RST format
21− code.lhs Another page with some code (which can be highlighted)
22− css Directory for CSS files
23− |- default.css The main CSS file
24− \- syntax.css CSS file for code syntax highlighting
25− hakyll.hs Our code to generate the site
26− images Directory for images
27− \- haskell-logo.png The logo of my favorite programming language
28− index.markdown A simple page in markdown format
29− templates Directory for templates
30− \- default.html The main template for the site
22+Basic rules
23+-----------
3124
32−By default, hakyll will compile everything to the `_site` directory. We can try
33−this like this:
34−
35− [jasper@phoenix] ghc --make hakyll.hs
36− [jasper@phoenix] ./hakyll build
37−
38−Instead of using `build`, we can also use `preview`, which will fire up a
39−webserver serving the `_site` directory, so have a look!
40−
41−All files have been compiled, and their output has been placed in the `_site`
42−directory as illustrated in this diagram:
43−
44−
45−
46−No magic is involved at all -- we will precisely study how and why our items are
47−compiled like that. All of this is specified in the `hakyll.hs` file. You can
48−view the full `hakyll.hs` file online [here][brochure-hakyll.hs], or you can
49−look in the directory you cloned or downloaded.
50−
51−[brochure-hakyll.hs]: http://github.com/jaspervdj/hakyll-examples/blob/master/brochure/hakyll.hs
25+TODO
5226
5327## Images
5428