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?
|
||||
|
||||
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
|
||||
route idRoute
|
||||
compile $ do
|
||||
posts <- recentFirst =<< loadAllSnapshots ("posts/*" .&&. complement "posts/*.lhs") "feedContent"
|
||||
renderAtom feedConfiguration feedCtx posts
|
||||
compileFeed renderAtom
|
||||
|
||||
create ["rss.xml"] $ do
|
||||
route idRoute
|
||||
compile $ do
|
||||
posts <- recentFirst =<< loadAllSnapshots ("posts/*" .&&. complement "posts/*.lhs") "feedContent"
|
||||
renderRss feedConfiguration feedCtx posts
|
||||
compileFeed renderRss
|
||||
|
||||
tagsRules tags $ \tag pattern -> do
|
||||
let title = "Posts tagged \"" ++ tag ++ "\""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user