simiweb/Main.hs
Julien Marquet 060d7f8c77 Draft
2024-02-04 17:06:16 +01:00

33 lines
758 B
Haskell

{-# LANGUAGE OverloadedStrings #-}
import qualified GHC.IO.Encoding as E
import Data.Monoid (mappend)
import Hakyll
main :: IO ()
main = do
E.setLocaleEncoding E.utf8
hakyll $ do
match "assets/css/*" $ do
route idRoute
compile compressCssCompiler
match "assets/images/*" $ do
route idRoute
compile copyFileCompiler
match "index.md" $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "index.html" defaultContext
>>= relativizeUrls
match "index.html" $ compile templateBodyCompiler
{-match "index.html" $ do
route $ idRoute
compile $ getResourceBody
>>= relativizeUrls-}
match "layouts/*" $ compile templateBodyCompiler