-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} import Hakyll import Data.List (isSuffixOf) -------------------------------------------------------------------------------- main :: IO () main = hakyllWith defaultConfiguration $ do match "well-known/*" $ do route (customRoute (prepend '.'. toFilePath)) compile copyFileCompiler match "images/*" $ do route idRoute compile copyFileCompiler match "resources/*" $ do route idRoute compile copyFileCompiler match "css/*" $ do route idRoute compile compressCssCompiler match "js/*" $ do route idRoute compile compressCssCompiler match (fromList ["index.markdown", "contact.markdown"]) $ do route $ setExtension "html" compile $ pandocCompiler >>= loadAndApplyTemplate "templates/default.html" defaultContext >>= relativizeUrls match "templates/*" $ compile templateBodyCompiler prepend :: a -> [a] -> [a] prepend = (:)