From 3c4c254bd708d207e8388fb2427932aeb453547a Mon Sep 17 00:00:00 2001 From: nek0 Date: Sat, 25 Nov 2023 05:45:49 +0100 Subject: [PATCH] cleanup --- src/Main.hs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 78869c9..6cf278d 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -41,15 +41,9 @@ main = do route myRoute compile compressCssCompiler - -- match "site/css/*.scss" $ do - -- route $ myRoute `composeRoutes` setExtension "css" - -- compile $ fmap compressCss <$> sassCompiler - match (fromList ["site/about.md", "site/contact.md"]) $ do route $ myRoute `composeRoutes` setExtension "html" compile $ do - -- firstUrl <- return . fromMaybe "" =<< getRoute (head is) - -- latestUrl <- return . fromMaybe "" =<< getRoute (last is) pandocCompiler >>= loadAndApplyTemplate "templates/default.html" -- (menuCtx firstUrl latestUrl) @@ -83,8 +77,6 @@ main = do create ["archive.html"] $ do route idRoute compile $ do - -- firstUrl <- return . fromMaybe "" =<< getRoute (head is) - -- latestUrl <- return . fromMaybe "" =<< getRoute (last is) posts <- recentFirst =<< loadAll "site/posts/*" let archiveCtx = listField "posts" postCtx (return posts) <> @@ -104,8 +96,6 @@ main = do paginateRules pages $ \num pat -> do route $ myRoute `composeRoutes` setExtension "html" compile $ do - -- firstUrl <- fmap ('/' :) . return . fromMaybe "" =<< getRoute (head is) - -- latestUrl <- fmap ('/' :) . return . fromMaybe "" =<< getRoute (last is) ident <- getUnderlying title <- getMetadataField' ident "title" url <- return . fromMaybe "" =<< getRoute ident @@ -120,16 +110,6 @@ main = do defaultCtx full >>= relativizeUrls - -- create ["index.html"] $ do - -- route idRoute - -- compile $ do - -- post <- fmap head . recentFirst =<< (loadAll "site/posts/*" :: Compiler [Item String]) - -- let indexCtx = - -- constField "date" "%B %e, %Y" <> - -- defaultCtx - -- makeItem (itemBody post) - -- >>= relativizeUrls - -------------------------------------------------------------------------------- myRoute :: Routes