2011-02-10 11:29:40 +00:00
|
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
import Control.Arrow ((>>>))
|
|
|
|
import Control.Monad (forM_)
|
|
|
|
|
|
|
|
import Hakyll
|
|
|
|
|
|
|
|
main :: IO ()
|
|
|
|
main = hakyll $ do
|
2011-04-05 14:20:43 +00:00
|
|
|
match "css/*" $ do
|
|
|
|
route idRoute
|
|
|
|
compile compressCssCompiler
|
2011-02-10 11:29:40 +00:00
|
|
|
|
2011-04-05 14:20:43 +00:00
|
|
|
match "templates/*" $ compile templateCompiler
|
2011-02-10 11:29:40 +00:00
|
|
|
|
2011-04-05 14:20:43 +00:00
|
|
|
forM_ ["about.rst", "index.markdown", "code.lhs"] $ \page ->
|
|
|
|
match page $ do
|
|
|
|
route $ setExtension "html"
|
|
|
|
compile $ pageCompiler
|
|
|
|
>>> applyTemplateCompiler "templates/default.html"
|
|
|
|
>>> relativizeUrlsCompiler
|