aboutsummaryrefslogtreecommitdiff
path: root/Cooking.hs
diff options
context:
space:
mode:
authorJoris2017-02-23 10:21:12 +0100
committerJoris2017-02-23 10:21:12 +0100
commit0079d42ef128a1d91daa4f483f2b65e3e9b6bfdc (patch)
tree74fc9840598a6931e5deb8a145054e0f00fe8988 /Cooking.hs
parent8e396abf9f55141f3b6ebab4577edefcbc010c10 (diff)
downloadcooking-0079d42ef128a1d91daa4f483f2b65e3e9b6bfdc.tar.gz
cooking-0079d42ef128a1d91daa4f483f2b65e3e9b6bfdc.tar.bz2
cooking-0079d42ef128a1d91daa4f483f2b65e3e9b6bfdc.zip
Add shortbread recipe
Diffstat (limited to 'Cooking.hs')
-rw-r--r--Cooking.hs39
1 files changed, 0 insertions, 39 deletions
diff --git a/Cooking.hs b/Cooking.hs
deleted file mode 100644
index 809f50f..0000000
--- a/Cooking.hs
+++ /dev/null
@@ -1,39 +0,0 @@
-{-# LANGUAGE OverloadedStrings #-}
-
-import Data.Monoid (mappend)
-import Hakyll
-
-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
- }