diff options
Diffstat (limited to 'data/example/site.hs')
-rw-r--r-- | data/example/site.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/data/example/site.hs b/data/example/site.hs new file mode 100644 index 0000000..df53095 --- /dev/null +++ b/data/example/site.hs @@ -0,0 +1,23 @@ +-------------------------------------------------------------------------------- +{-# LANGUAGE OverloadedStrings #-} +import Hakyll + + +-------------------------------------------------------------------------------- +main :: IO () +main = hakyll $ do + match "images/*" $ do + route idRoute + compile copyFileCompiler + + match "css/*" $ do + route idRoute + compile compressCssCompiler + + match (fromList ["about.rst", "index.markdown", "code.lhs"]) $ do + route $ setExtension "html" + compile $ pageCompiler + >>= requireApplyTemplate "templates/default.html" defaultContext + >>= relativizeUrls + + match "templates/*" $ compile templateCompiler |