From c8992bc7543d8ca7c2ee3cc200a7fbf1a5fae059 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 02:50:26 +0100 Subject: Initial --- site.hs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 site.hs (limited to 'site.hs') diff --git a/site.hs b/site.hs new file mode 100644 index 0000000..a02e75d --- /dev/null +++ b/site.hs @@ -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 -- cgit v1.2.1