-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.hs
32 lines (26 loc) · 996 Bytes
/
site.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
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
import Hakyll
import System.FilePath
--------------------------------------------------------------------------------
main :: IO ()
main = hakyll $ do
match "images/*" $ do
route idRoute
compile copyFileCompiler
match "brochures/*" $ do
route idRoute
compile copyFileCompiler
match "dist/**" $ do
route (customRoute $ joinPath . tail .splitPath . toFilePath)
compile copyFileCompiler
match "scss/**/*.css" $ do
route (customRoute $ joinPath . tail . splitPath . toFilePath)
compile copyFileCompiler
compile compressCssCompiler
match "*.html" $ do
route idRoute
compile $ getResourceBody
>>= loadAndApplyTemplate "templates/default.html" defaultContext
>>= relativizeUrls
match "templates/*" $ compile templateBodyCompiler