@@ -1,8 +1,47 @@
11---
22title: FAQ
3−author: Jasper Van der Jeugt
43---
54
5+## "File name does not match module name" on Mac OS
6+
7+ Hakyll.hs:1:1:
8+ File name does not match module name:
9+ Saw: `Main'
10+ Expected: `Hakyll'
11+
12+Is an error encountered on Mac OS when `hakyll.hs` is located on a
13+case-insensitive filesystem. A workaround is to rename it to something that
14+isn't the name of the module, for example, `site.hs`.
15+
16+## `pageCompiler`/Hakyll/Pandoc eats my HTML!
17+
18+Sometimes, it can seem that HTML pages are stripped of some arbitrary tags, e.g.
19+`<div>`'s. The issue here is that, when using the default `pageCompiler`, your
20+page passes through Pandoc. Pandoc unfortunately strips away this information,
21+giving you the "wrong" HTML.
22+
23+The solution is not to use `pageCompiler` -- it is very common to write custom
24+page processing compiler. The definition of `pageCompiler` is, put simply:
25+
26+~~~~~{.haskell}
27+pageCompiler =
28+ readPageCompiler >>>
29+ addDefaultFields >>> -- Sets some things like $path$
30+ arr applySelf >>> -- Used to fill in $var$s in the page
31+ pageRenderPandoc -- Pass through pandoc
32+~~~~~
33+
34+You can add your own version in your `hakyll.hs` file:
35+
36+~~~~~{.haskell}
37+myPageCompiler =
38+ readPageCompiler >>>
39+ addDefaultFields >>> -- Sets some things like $path$
40+ arr applySelf >>> -- Used to fill in $var$s in the page
41+~~~~~
42+
43+And using this instead of `pageCompiler` should solve the issue.
44+
645## Does Hakyll support syntax highlighting?
746
847Syntax highlighting is enabled by default in Hakyll. However, you also need to
@@ -41,14 +80,3 @@ or
4180
4281[regex-pcre]: http://hackage.haskell.org/package/regex-pcre
4382[pcre]: http://www.pcre.org/
44−
45−## "File name does not match module name" on Mac OS
46−
47− Hakyll.hs:1:1:
48− File name does not match module name:
49− Saw: `Main'
50− Expected: `Hakyll'
51−
52−Is an error encountered on Mac OS when `hakyll.hs` is located on a
53−case-insensitive filesystem. A workaround is to rename it to something that
54−isn't the name of the module, for example, `site.hs`.