aboutsummaryrefslogtreecommitdiff
path: root/src/Cooking.hs
diff options
context:
space:
mode:
authorJoris2017-03-05 15:44:50 +0100
committerJoris2017-03-05 15:44:50 +0100
commit8e448ffc31685427afaee62a0379c33525769a6a (patch)
tree4199b4aaf6734718f3ff65afcab422e46543ddea /src/Cooking.hs
parenta269afd23073d03faee7f3c17bdbcf8f6b5de903 (diff)
Use stack
Diffstat (limited to 'src/Cooking.hs')
-rw-r--r--src/Cooking.hs43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/Cooking.hs b/src/Cooking.hs
deleted file mode 100644
index e5f92b9..0000000
--- a/src/Cooking.hs
+++ /dev/null
@@ -1,43 +0,0 @@
-{-# LANGUAGE OverloadedStrings #-}
-
-import Data.List (sortBy)
-import Data.Monoid (mappend)
-import Data.Ord (comparing)
-
-import Hakyll
-import Hakyll.Core.Item (Item(itemIdentifier))
-
-main :: IO ()
-main = hakyllWith configuration $ do
- match "images/*" $ do
- route idRoute
- compile copyFileCompiler
-
- match "design/*.hs" $ do
- route $ setExtension "css"
- compile $ getResourceString >>= withItemBody (unixFilter "runghc" [])
-
- match "recipes/*" $ do
- route $ setExtension "html"
- compile $ pandocCompiler
- >>= loadAndApplyTemplate "templates/main.html" defaultContext
- >>= relativizeUrls
-
- match "index.html" $ do
- route idRoute
- let context =
- listField "recipes" defaultContext (loadAll "recipes/*") `mappend`
- defaultContext
- compile $
- getResourceBody
- >>= applyAsTemplate context
- >>= loadAndApplyTemplate "templates/main.html" context
- >>= relativizeUrls
-
- match "templates/*" $ compile templateBodyCompiler
-
-configuration :: Configuration
-configuration = defaultConfiguration
- { destinationDirectory = "public"
- , inMemoryCache = True
- }