diff options
author | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 02:50:26 +0100 |
---|---|---|
committer | Paul Oliver <contact@pauloliver.dev> | 2024-04-01 21:42:38 +0200 |
commit | c8992bc7543d8ca7c2ee3cc200a7fbf1a5fae059 (patch) | |
tree | c8c05c8a85fcdf36b65e9580929b2151be6bea73 /site.hs |
Initial
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 |