#!/usr/bin/env runhaskell {-# LANGUAGE OverloadedStrings #-} import Control.Applicative ((<$>)) import Data.Monoid (mappend) import Hakyll import Control.Monad import Data.List import System.Directory import System.Process import Text.Pandoc.Options import Text.Printf main = do symlinkPagesFromParentDir symlinkIndexHtml symlinkProfsDir hakyll $ do match ("images/*" .||. "js/**" .||. "robots.txt") $ do route idRoute compile copyFileCompiler match "css/*" $ do route idRoute compile compressCssCompiler match "templates/*" $ compile templateCompiler match ("*.md" .||. "0.19/*.md" .||. "0.18/*.md") $ do route $ setExtension "html" compile $ pandocCompilerWith def def{writerTableOfContents=True ,writerStandalone=True ,writerTemplate="