-
Notifications
You must be signed in to change notification settings - Fork 1
/
bencherl.hs
71 lines (60 loc) · 2.12 KB
/
bencherl.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{-# LANGUAGE OverloadedStrings #-}
import Control.Arrow ((>>>))
import Hakyll
import Text.Pandoc
main :: IO ()
main = hakyll $ do
-- Stylesheets.
match "css/*.css" $ do
route idRoute
compile compressCssCompiler
match "css/start/*.css" $ do
route idRoute
compile compressCssCompiler
-- Stylesheet images.
match "css/start/images/*" $ do
route idRoute
compile copyFileCompiler
match "css/*.gif" $ do
route idRoute
compile copyFileCompiler
-- Images.
match "images/*" $ do
route idRoute
compile copyFileCompiler
match "images/graphs/*.png*" $ do
route idRoute
compile copyFileCompiler
-- Files.
match "files/*" $ do
route idRoute
compile copyFileCompiler
-- Javascript files.
match "js/*" $ do
route idRoute
compile copyFileCompiler
-- Favicon.
match "favicon.ico" $ do
route idRoute
compile copyFileCompiler
-- Templates.
match "templates/*" $ do
compile templateCompiler
-- Pages.
match (list ["index.md", "benchmarks.md", "people.md", "publications.md"]) $ do
route $ setExtension "html"
compile $ pageCompiler
>>> applyTemplateCompiler "templates/default.html"
>>> relativizeUrlsCompiler
-- How-to page (w/ TOC)
match "howto.md" $ do
route $ setExtension "html"
compile $ pageCompiler
>>> applyTemplateCompiler "templates/default.html"
>>> relativizeUrlsCompiler
-- Results page
match "results.md" $ do
route $ setExtension "html"
compile $ pageCompiler
>>> applyTemplateCompiler "templates/results.html"
>>> relativizeUrlsCompiler