Small refactor
This commit is contained in:
parent
4d0f72fd4f
commit
b4ea1f4a03
14
site.hs
14
site.hs
@ -143,18 +143,18 @@ main = do
|
|||||||
-- works/* for the above to actually work?
|
-- works/* for the above to actually work?
|
||||||
|
|
||||||
match "templates/*" $ compile templateCompiler
|
match "templates/*" $ compile templateCompiler
|
||||||
|
|
||||||
|
let compileFeed f = compile $ do
|
||||||
|
posts <- recentFirst =<< loadAllSnapshots ("posts/*" .&&. complement "posts/*.lhs") "feedContent"
|
||||||
|
f feedConfiguration feedCtx posts
|
||||||
|
|
||||||
create ["atom.xml"] $ do
|
create ["atom.xml"] $ do
|
||||||
route idRoute
|
route idRoute
|
||||||
compile $ do
|
compileFeed renderAtom
|
||||||
posts <- recentFirst =<< loadAllSnapshots ("posts/*" .&&. complement "posts/*.lhs") "feedContent"
|
|
||||||
renderAtom feedConfiguration feedCtx posts
|
|
||||||
|
|
||||||
create ["rss.xml"] $ do
|
create ["rss.xml"] $ do
|
||||||
route idRoute
|
route idRoute
|
||||||
compile $ do
|
compileFeed renderRss
|
||||||
posts <- recentFirst =<< loadAllSnapshots ("posts/*" .&&. complement "posts/*.lhs") "feedContent"
|
|
||||||
renderRss feedConfiguration feedCtx posts
|
|
||||||
|
|
||||||
tagsRules tags $ \tag pattern -> do
|
tagsRules tags $ \tag pattern -> do
|
||||||
let title = "Posts tagged \"" ++ tag ++ "\""
|
let title = "Posts tagged \"" ++ tag ++ "\""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user