aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoris2017-05-10 08:48:19 +0200
committerJoris2017-05-10 08:48:19 +0200
commit851b14df862eaeed3a8d783630f5e45ef22c5c7f (patch)
tree16913d3e90c774ecca810e48d2ee78927d30eabf /src
parentb15bf20e39b38783ffd521eb7caf4c471d54ef0d (diff)
Group by main dishes / desserts (high / low carbs)
Diffstat (limited to 'src')
-rw-r--r--src/Main.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Main.hs b/src/Main.hs
index c781cd4..dd37fe4 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -27,7 +27,7 @@ main = hakyllWith configuration $ do
unsafeCompiler (readProcess "pulp" [ "build", "--optimise", "--src-path", "js" ] "")
>>= makeItem
- match "recipes/*" $ do
+ match "recipes/**" $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/main.html" defaultContext
@@ -36,7 +36,9 @@ main = hakyllWith configuration $ do
match "index.html" $ do
route idRoute
let context =
- listField "recipes" defaultContext (loadAll "recipes/*") `mappend`
+ listField "mainDishes" defaultContext (loadAll "recipes/main-dishes/*") `mappend`
+ listField "lowCarbDesserts" defaultContext (loadAll "recipes/desserts/low-carb/*") `mappend`
+ listField "highCarbDesserts" defaultContext (loadAll "recipes/desserts/high-carb/*") `mappend`
defaultContext
compile $
getResourceBody