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
siteTitlestring- Channel title.
siteDescriptionstring- Channel description.
canonicalBaseUrlstring- Absolute site base; when null/empty, links stay site-relative and the atom self-link is omitted.
itemsIEnumerable<RssFeedItem>- Feed entries; each
Urlis a site-relative canonical path.
Returns
stringPennington.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)
;
}