3author: Jasper Van der Jeugt
6## "File name does not match module name" on Mac OS
9 File name does not match module name:
13Is an error encountered on Mac OS when `hakyll.hs` is located on a
14case-insensitive filesystem. A workaround is to rename it to something that
15isn't the name of the module, for example, `site.hs`.
17## `pageCompiler`/Hakyll/Pandoc eats my HTML!
19Sometimes, it can seem that HTML pages are stripped of some arbitrary tags, e.g.
20`<div>`'s. The issue here is that, when using the default `pageCompiler`, your
21page passes through Pandoc. Pandoc unfortunately strips away this information,
22giving you the "wrong" HTML.
24The solution is not to use `pageCompiler` -- it is very common to write custom
25page processing compiler. The definition of `pageCompiler` is, put simply:
30 addDefaultFields >>> -- Sets some things like $path$
31 arr applySelf >>> -- Used to fill in $var$s in the page
32 pageRenderPandoc -- Pass through pandoc
35You can add your own version in your `hakyll.hs` file:
40 addDefaultFields >>> -- Sets some things like $path$
41 arr applySelf -- Used to fill in $var$s in the page
44And using this instead of `pageCompiler` should solve the issue.
46## Does Hakyll support syntax highlighting?
48Syntax highlighting is enabled by default in Hakyll if you are using a somewhat
49recent version of Pandoc (1.9 and onwards). Note that you also need to include
50some CSS in order for this to work! This site, for example, uses the [default
51Pandoc syntax CSS file][syntax-css].
53[syntax-css]: https://github.com/jaspervdj/hakyll/blob/master/web/css/syntax.css
55## When should I rebuild and when should I build?
57If you execute a `./hakyll build`, Hakyll will build your site incrementally.
58This means it will be very fast, but it will not pick up _all_ changes.
60- In case you edited `hakyll.hs`, you first want to compile it again.
61- It is generally recommended to do a `./hakyll rebuild` before you deploy your
64After rebuilding your site, all files will look as "modified" to the filesystem.
65This means that when you upload your site, it will usually transfer all files --
66this can generate more traffic than necessary, since it is possible that some
67files were not actually modified. If you use `rsync`, you can counter this using
68the `--checksum` option.
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list