This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

RssFeedWriter Pennington.Feeds

Serializes a set of RssFeedItem to an RSS 2.0 document for the /rss.xml endpoint. Items without a publish date are dropped; the rest are ordered newest-first and their links composed against the feed base URL.

Methods

WriteXml

#
public static string WriteXml(string siteTitle, string siteDescription, string canonicalBaseUrl, IEnumerable<RssFeedItem> items)

Builds the RSS 2.0 XML for a feed.

Parameters

siteTitle string
Channel title.
siteDescription string
Channel description.
canonicalBaseUrl string
Absolute site base; when null/empty, links stay site-relative and the atom self-link is omitted.
items IEnumerable<RssFeedItem>
Feed entries; each Url is a site-relative canonical path.

Returns

string

Pennington.Feeds.RssFeedWriter

namespace Pennington.Feeds;

/// Serializes a set of RssFeedItem to an RSS 2.0 document for the /rss.xml endpoint. Items without a publish date are dropped; the rest are ordered newest-first and their links composed against the feed base URL.
public class RssFeedWriter
{
    /// Builds the RSS 2.0 XML for a feed.
    
public static string WriteXml(string siteTitle, string siteDescription, string canonicalBaseUrl, IEnumerable<RssFeedItem> items)
; }