on b287c82 help sign in
hakyll/web/tutorials/02-basics.markdown
44 lines 1.2 kB history raw
1---
2title: The basics
3author: Jasper Van der Jeugt
4---
6Building and cleaning
7---------------------
9If you followed along with the previous tutorial, you should now have the
10example site up and running. By running `./site build`, you created two
11directories:
13- `_site`, with your site as HTML files, ready to be deployed;
14- `_cache`, which Hakyll uses internally.
16`./site clean` removes these directories, and `./site rebuild` performs a
17`clean` and then a `build`.
19In 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.
22At this point, feel free to change some files, `./site build` and see what
23happens!
25Pages and metadata
26------------------
28You might've noticed that the markdown pages all start with a block:
30 ---
31 title: Contact
32 ---
34 I live...
36This is entirely optional, but useful for providing extra information
37("metadata") about items. All items can have metadata: since it's not really
38convenient to add such a header to an image, you can also do this using a
39separate file.
41For a file called `images/foo.png`, you can add an `images/foo.png.metadata`
42file with contents:
44 title: An image of a cow