mirror of https://github.com/newtype256/website
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
689 B
Haskell
23 lines
689 B
Haskell
3 years ago
|
--------------------------------------------------------------------------------
|
||
|
{-# LANGUAGE OverloadedStrings #-}
|
||
|
import Data.Monoid (mappend)
|
||
|
import Hakyll
|
||
|
|
||
|
|
||
|
--------------------------------------------------------------------------------
|
||
|
main :: IO ()
|
||
|
main = hakyll $ do
|
||
|
match "css/*" $ do
|
||
|
route idRoute
|
||
|
compile compressCssCompiler
|
||
|
|
||
|
match "index.html" $ do
|
||
|
route idRoute
|
||
|
compile $ do
|
||
|
getResourceBody
|
||
|
>>= applyAsTemplate indexCtx
|
||
|
>>= loadAndApplyTemplate "templates/default.html" indexCtx
|
||
|
>>= relativizeUrls
|
||
|
|
||
|
match "templates/*" $ compile templateBodyCompiler
|