pumpkin.hs 561 B

123456789101112131415161718192021
  1. module Main where
  2. import Hakyll
  3. main :: IO ()
  4. main =
  5. hakyll $
  6. do match "res/favicon.ico" $
  7. do route (gsubRoute "res/" (const ""))
  8. compile copyFileCompiler
  9. match "res/bootstrap.css" $
  10. do route idRoute
  11. compile compressCssCompiler
  12. match "pages/*" $
  13. do route (composeRoutes (setExtension "html")
  14. (gsubRoute "pages/" (const "")))
  15. compile $
  16. pandocCompiler >>=
  17. loadAndApplyTemplate "tpl/default.tpl" defaultContext >>=
  18. relativizeUrls