cleanup
This commit is contained in:
parent
f3ceffb970
commit
3c4c254bd7
1 changed files with 0 additions and 20 deletions
20
src/Main.hs
20
src/Main.hs
|
@ -41,15 +41,9 @@ main = do
|
||||||
route myRoute
|
route myRoute
|
||||||
compile compressCssCompiler
|
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
|
match (fromList ["site/about.md", "site/contact.md"]) $ do
|
||||||
route $ myRoute `composeRoutes` setExtension "html"
|
route $ myRoute `composeRoutes` setExtension "html"
|
||||||
compile $ do
|
compile $ do
|
||||||
-- firstUrl <- return . fromMaybe "" =<< getRoute (head is)
|
|
||||||
-- latestUrl <- return . fromMaybe "" =<< getRoute (last is)
|
|
||||||
pandocCompiler
|
pandocCompiler
|
||||||
>>= loadAndApplyTemplate "templates/default.html"
|
>>= loadAndApplyTemplate "templates/default.html"
|
||||||
-- (menuCtx firstUrl latestUrl)
|
-- (menuCtx firstUrl latestUrl)
|
||||||
|
@ -83,8 +77,6 @@ main = do
|
||||||
create ["archive.html"] $ do
|
create ["archive.html"] $ do
|
||||||
route idRoute
|
route idRoute
|
||||||
compile $ do
|
compile $ do
|
||||||
-- firstUrl <- return . fromMaybe "" =<< getRoute (head is)
|
|
||||||
-- latestUrl <- return . fromMaybe "" =<< getRoute (last is)
|
|
||||||
posts <- recentFirst =<< loadAll "site/posts/*"
|
posts <- recentFirst =<< loadAll "site/posts/*"
|
||||||
let archiveCtx =
|
let archiveCtx =
|
||||||
listField "posts" postCtx (return posts) <>
|
listField "posts" postCtx (return posts) <>
|
||||||
|
@ -104,8 +96,6 @@ main = do
|
||||||
paginateRules pages $ \num pat -> do
|
paginateRules pages $ \num pat -> do
|
||||||
route $ myRoute `composeRoutes` setExtension "html"
|
route $ myRoute `composeRoutes` setExtension "html"
|
||||||
compile $ do
|
compile $ do
|
||||||
-- firstUrl <- fmap ('/' :) . return . fromMaybe "" =<< getRoute (head is)
|
|
||||||
-- latestUrl <- fmap ('/' :) . return . fromMaybe "" =<< getRoute (last is)
|
|
||||||
ident <- getUnderlying
|
ident <- getUnderlying
|
||||||
title <- getMetadataField' ident "title"
|
title <- getMetadataField' ident "title"
|
||||||
url <- return . fromMaybe "" =<< getRoute ident
|
url <- return . fromMaybe "" =<< getRoute ident
|
||||||
|
@ -120,16 +110,6 @@ main = do
|
||||||
defaultCtx full
|
defaultCtx full
|
||||||
>>= relativizeUrls
|
>>= 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
|
myRoute :: Routes
|
||||||
|
|
Loading…
Reference in a new issue