From 0b91d4f69f9a7492df75e25d29e8334092f653f0 Mon Sep 17 00:00:00 2001 From: nek0 Date: Thu, 3 Mar 2016 23:43:02 +0100 Subject: [PATCH] deduplication of code --- src/Main.hs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 52d7e3c..55d56cb 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -46,7 +46,7 @@ main = do >>= loadAndApplyTemplate "templates/default.html" baseCtx >>= relativizeUrls - match "about.md" $ do + match (fromList ["about.md", "imprint.md", "contact.md"]) $ do route $ setExtension "html" compile $ pandocCompiler >>= loadAndApplyTemplate "templates/default.html" baseCtx @@ -57,18 +57,6 @@ main = do compile $ pandocCompiler >>= loadAndApplyTemplate "templates/default.html" baseCtx - match "imprint.md" $ do - route $ setExtension "html" - compile $ pandocCompiler - >>= loadAndApplyTemplate "templates/default.html" baseCtx - >>= relativizeUrls - - match "contact.md" $ do - route $ setExtension "html" - compile $ pandocCompiler - >>= loadAndApplyTemplate "templates/default.html" baseCtx - >>= relativizeUrls - pages <- buildPaginateWith (return . map return . sort) "posts/*.md"