summaryrefslogtreecommitdiff
path: root/examples/morepages/hakyll.hs
blob: 3329b555f5319ae5f7f21487846cea3d195dcb92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import Text.Hakyll (hakyll)
import Text.Hakyll.File (directory)
import Text.Hakyll.Render (css, static, renderChain)
import Text.Hakyll.CreateContext (createPage, combine)

main = hakyll "http://example.com" $ do
    directory css "css"
    render "about.markdown"
    render "index.markdown"
    render "products.markdown"
  where
    render = renderChain ["templates/default.html"] . withFooter . createPage
    withFooter = flip combine $ createPage "footer.markdown"