hakyll-2.0: A simple static site generator library.Source codeContentsIndex
Text.Hakyll.Feed
Description

A Module that allows easy rendering of RSS feeds. If you use this module, you must make sure you set the absoluteUrl field in the main Hakyll configuration.

Apart from that, the main rendering functions (renderRss, renderAtom) all assume that you pass the list of items so that the most recent entry in the feed is the first item in the list.

Also note that the Contexts should have (at least) the following fields to produce a correct feed:

  • $title: Title of the item.
  • $description: Description to appear in the feed.
  • $url: URL to the item - this is usually set automatically.

Furthermore, the feed will be generated, but will be incorrect (it won't validate) if an empty list is passed.

Synopsis
data FeedConfiguration = FeedConfiguration {
feedUrl :: String
feedTitle :: String
feedDescription :: String
feedAuthorName :: String
}
renderRss :: FeedConfiguration -> [HakyllAction () Context] -> Hakyll ()
renderAtom :: FeedConfiguration -> [HakyllAction () Context] -> Hakyll ()
Documentation
data FeedConfiguration Source
This is a data structure to keep the configuration of a feed.
Constructors
FeedConfiguration
feedUrl :: StringUrl of the feed (relative to site root). For example, rss.xml.
feedTitle :: StringTitle of the feed.
feedDescription :: StringDescription of the feed.
feedAuthorName :: StringName of the feed author.
renderRssSource
:: FeedConfigurationFeed configuration.
-> [HakyllAction () Context]Items to include in the feed.
-> Hakyll ()
Render an RSS feed with a number of items.
renderAtomSource
:: FeedConfigurationFeed configuration.
-> [HakyllAction () Context]Items to include in the feed.
-> Hakyll ()
Render an Atom feed with a number of items.
Produced by Haddock version 2.7.2