summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2011-11-23 12:36:51 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2011-11-23 12:36:51 +0100
commite1687cbb300323e5975413caaf813e07939e89dc (patch)
tree66b0e1dc48e0a56577e3a1ca59cdbece8b947950 /web
parent87d25b891e5578b18e8205907ec00012af7cc705 (diff)
downloadhakyll-e1687cbb300323e5975413caaf813e07939e89dc.tar.gz
Update FAQ
Diffstat (limited to 'web')
-rw-r--r--web/sidebar.markdown1
-rw-r--r--web/tutorials/faq.markdown52
2 files changed, 41 insertions, 12 deletions
diff --git a/web/sidebar.markdown b/web/sidebar.markdown
index 24f44b7..287ce7a 100644
--- a/web/sidebar.markdown
+++ b/web/sidebar.markdown
@@ -3,6 +3,7 @@
[home](/index.html)
[philosophy](/philosophy.html)
[about](/about.html)
+[faq](/tutorials/faq.html)
[tutorials](/tutorials.html)
[examples](/examples.html)
[reference](/reference.html)
diff --git a/web/tutorials/faq.markdown b/web/tutorials/faq.markdown
index ce90042..6d51617 100644
--- a/web/tutorials/faq.markdown
+++ b/web/tutorials/faq.markdown
@@ -1,8 +1,47 @@
---
title: FAQ
-author: Jasper Van der Jeugt
---
+## "File name does not match module name" on Mac OS
+
+ Hakyll.hs:1:1:
+ File name does not match module name:
+ Saw: `Main'
+ Expected: `Hakyll'
+
+Is an error encountered on Mac OS when `hakyll.hs` is located on a
+case-insensitive filesystem. A workaround is to rename it to something that
+isn't the name of the module, for example, `site.hs`.
+
+## `pageCompiler`/Hakyll/Pandoc eats my HTML!
+
+Sometimes, it can seem that HTML pages are stripped of some arbitrary tags, e.g.
+`<div>`'s. The issue here is that, when using the default `pageCompiler`, your
+page passes through Pandoc. Pandoc unfortunately strips away this information,
+giving you the "wrong" HTML.
+
+The solution is not to use `pageCompiler` -- it is very common to write custom
+page processing compiler. The definition of `pageCompiler` is, put simply:
+
+~~~~~{.haskell}
+pageCompiler =
+ readPageCompiler >>>
+ addDefaultFields >>> -- Sets some things like $path$
+ arr applySelf >>> -- Used to fill in $var$s in the page
+ pageRenderPandoc -- Pass through pandoc
+~~~~~
+
+You can add your own version in your `hakyll.hs` file:
+
+~~~~~{.haskell}
+myPageCompiler =
+ readPageCompiler >>>
+ addDefaultFields >>> -- Sets some things like $path$
+ arr applySelf >>> -- Used to fill in $var$s in the page
+~~~~~
+
+And using this instead of `pageCompiler` should solve the issue.
+
## Does Hakyll support syntax highlighting?
Syntax highlighting is enabled by default in Hakyll. However, you also need to
@@ -41,14 +80,3 @@ or
[regex-pcre]: http://hackage.haskell.org/package/regex-pcre
[pcre]: http://www.pcre.org/
-
-## "File name does not match module name" on Mac OS
-
- Hakyll.hs:1:1:
- File name does not match module name:
- Saw: `Main'
- Expected: `Hakyll'
-
-Is an error encountered on Mac OS when `hakyll.hs` is located on a
-case-insensitive filesystem. A workaround is to rename it to something that
-isn't the name of the module, for example, `site.hs`.