You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

31 lines
868 B

{-# LANGUAGE OverloadedStrings #-}
import Data.Maybe (fromMaybe)
import qualified GHC.IO.Encoding as E
import Hakyll
import Hakyll.Process
main :: IO ()
main = do
E.setLocaleEncoding E.utf8
hakyll $ do
match "templates/*" $
compile templateBodyCompiler
match "services-info.md" $ do
route $ setExtension "html"
compile $
pandocCompiler
>>= loadAndApplyTemplate "templates/services-info.html" defaultContext
match ("*.md" .&&. complement "services-info.md") $ do
route $ setExtension "html"
compile $
pandocCompiler
>>= loadAndApplyTemplate "templates/default.html" defaultContext
match "*.elm" $ do
route $ setExtension "js"
compile $ execCompilerWith (execName "elm") [ProcArg "make", HakFilePath, ProcArg "--output=main.js"] (COutFile $ SpecificPath "main.js")