summaryrefslogtreecommitdiff
path: root/examples/brochure/hakyll.hs
blob: 8040bdf19661bab6b8ba18c1cd5aaa96210601e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# LANGUAGE OverloadedStrings #-}
import Control.Arrow ((>>>))
import Control.Monad (forM_)

import Hakyll

main :: IO ()
main = hakyll $ do
    route   "css/*" idRoute
    compile "css/*" compressCssCompiler

    compile "templates/*" templateCompiler

    forM_ ["about.rst", "index.markdown", "code.lhs"] $ \page -> do
        route   page $ setExtension "html"
        compile page $ readPageCompiler
            >>> applyTemplateCompiler "templates/default.html"
            >>> relativizeUrlsCompiler