From 851b14df862eaeed3a8d783630f5e45ef22c5c7f Mon Sep 17 00:00:00 2001 From: Joris Date: Wed, 10 May 2017 08:48:19 +0200 Subject: Group by main dishes / desserts (high / low carbs) --- src/Main.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3