hakyll-2.3: A simple static site generator library.

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

Documentation

data FeedConfiguration Source

This is a data structure to keep the configuration of a feed.

Constructors

FeedConfiguration 

Fields

feedUrl :: String

Url of the feed (relative to site root). For example, rss.xml.

feedTitle :: String

Title of the feed.

feedDescription :: String

Description of the feed.

feedAuthorName :: String

Name of the feed author.

renderRssSource

Arguments

:: FeedConfiguration

Feed configuration.

-> [HakyllAction () Context]

Items to include in the feed.

-> Hakyll () 

Render an RSS feed with a number of items.

renderAtomSource

Arguments

:: FeedConfiguration

Feed configuration.

-> [HakyllAction () Context]

Items to include in the feed.

-> Hakyll () 

Render an Atom feed with a number of items.