Add support for Atom and RSS content feeds - this info is available through mf2 anyway so Atom and RSS are kinda redundant, but we'll include them anyway

This commit is contained in:
Danielle McLean 2017-10-09 13:32:13 +11:00
parent 1f1108a886
commit 4088735c69
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
6 changed files with 65 additions and 1 deletions

View file

@ -6,6 +6,9 @@
module Handler.Home where
import Import
import Yesod.AtomFeed ( atomLink )
import Widget.Card ( hCard )
import Widget.Feed ( hFeed )
@ -16,7 +19,9 @@ getHomeR = do
entries <- runDB $ selectList [EntryAuthorId ==. userId] [Desc EntryPublished]
defaultLayout $ do
case maybeTitle of
Just title -> setTitle $ toHtml title
Just title -> do
setTitle $ toHtml title
atomLink FeedR title
Nothing -> return ()
toWidgetHead
[hamlet|