diff options
Diffstat (limited to 'site.hs')
-rw-r--r-- | site.hs | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -0,0 +1,32 @@ +{-# LANGUAGE OverloadedStrings #-} + +import Hakyll + ( Configuration(..) + , compile + , compressCssCompiler + , defaultConfiguration + , defaultContext + , hakyllWith + , idRoute + , loadAndApplyTemplate + , match + , pandocCompiler + , relativizeUrls + , route + , setExtension + , templateBodyCompiler + ) + +config :: Configuration +config = defaultConfiguration {deployCommand = "rsync -rv _site/ debnode:portfolio"} + +main :: IO () +main = + hakyllWith config $ do + match "index.md" $ do + route $ setExtension "html" + compile $ pandocCompiler >>= loadAndApplyTemplate "templates/default.html" defaultContext >>= relativizeUrls + match "css/*" $ do + route idRoute + compile compressCssCompiler + match "templates/*" $ compile templateBodyCompiler |