aboutsummaryrefslogtreecommitdiff
path: root/site.hs
diff options
context:
space:
mode:
Diffstat (limited to 'site.hs')
-rw-r--r--site.hs32
1 files changed, 32 insertions, 0 deletions
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