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

@ -5,6 +5,7 @@ module Handler.Entries where
import Import
import Web.Slug ( Slug )
import Yesod.AtomFeed ( atomLink )
import qualified Entry.Kind as K
import Widget.Entry ( entryR, hEntry )
@ -15,6 +16,7 @@ getEntriesR kind = do
entries <- runDB $ selectList [EntryKind ==. kind] [Desc EntryPublished]
defaultLayout $ do
setTitle . toHtml . K.pluralise $ kind
FeedKindR kind `atomLink` K.pluralise kind
$(widgetFile "entries")
checkMatching :: K.EntryKind -> Slug -> Entry -> Bool