aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: fb8c4ed6cff0c86b407c4915c65384c1d2bcc266 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
About
=====

This is a template site for [Hakyll](https://jaspervdj.be/hakyll/).
It is meant to be more flexible and powerful then the default template created by Hakyll.


Structure
=========

All inputs for Hakyll are under the [src](./src) directory. The
[compiler](./compiler) directory contains the [site builder](./compiler/site)
and may include any other Haskell dependencies.


Usage
=====

With Nix
--------

Use the [Nix](https://nixos.org/nix/) package manager:
```
$ nix build -f . -o www
```

This will build the site and put it into the `www` directory (a symbolic
link to a directory), ready to deploy.


Or:
```
$ nix build -f compiler site -o site
$ ./site/bin/site build
```

Manually
--------

1. Build the site builder: `cd compiler && cabal v2-build site`.
2. Use the site builder from the top directory:

```
$ /path/to/site --help
Static site compiler

Usage: site [-v|--verbose] [-o|--output DIR] [-s|--source DIR] [-c|--cache DIR]
            COMMAND

Available options:
  -v,--verbose             Run in verbose mode
  -o,--output DIR          Output directory (default: "_site")
  -s,--source DIR          Source directory (default: "./src")
  -c,--cache DIR           Cache directory (default: "_cache")
  -h,--help                Show this help text

Available commands:
  build                    Build the site
  clean                    Clean
  check                    Check links


$ /path/to/site build
Initialising...
  Creating store...
  Creating provider...
  Running rules...
Checking for out-of-date items
Compiling
  updated templates/default.html
  updated about.rst
  updated templates/post.html
  updated posts/2015-08-12-spqr.markdown
  updated posts/2015-10-07-rosa-rosa-rosam.markdown
  updated posts/2015-11-28-carpe-diem.markdown
  updated posts/2015-12-07-tu-quoque.markdown
  updated templates/archive.html
  updated templates/post-list.html
  updated archive.html
  updated contact.markdown
  updated css/default.css
  updated images/haskell-logo.png
  updated index.html
Success

```