32 lines
713 B
Haskell
32 lines
713 B
Haskell
|
{-# LANGUAGE OverloadedStrings #-}
|
||
|
|
||
|
import qualified GHC.IO.Encoding as E
|
||
|
import Data.Monoid (mappend)
|
||
|
import Hakyll
|
||
|
|
||
|
main :: IO ()
|
||
|
main = do
|
||
|
E.setLocaleEncoding E.utf8
|
||
|
hakyll $ do
|
||
|
match "assets/css/*" $ do
|
||
|
route idRoute
|
||
|
compile compressCssCompiler
|
||
|
|
||
|
match "assets/images/*" $ do
|
||
|
route idRoute
|
||
|
compile copyFileCompiler
|
||
|
|
||
|
{-match "index.md" $ do
|
||
|
route $ setExtension "html"
|
||
|
compile $ pandocCompiler
|
||
|
>>= loadAndApplyTemplate "layouts/default.html" defaultContext
|
||
|
>>= relativizeUrls-}
|
||
|
|
||
|
match "index.html" $ do
|
||
|
route $ idRoute
|
||
|
compile $ getResourceBody
|
||
|
>>= relativizeUrls
|
||
|
|
||
|
match "layouts/*" $ compile templateBodyCompiler
|
||
|
|