pyssg is pre-1.0 and under active development - APIs, config, and themes may change.
pyssg.plugins.rss

1 min read

pyssg.plugins.rss

RSS plugin.

During evaluate_collections it collects every document page and emits a single virtual page at /feed.xml holding an RSS 2.0 <channel>. Each <item> carries the document's title, its absolute link and a description taken from the document's excerpt meta (empty when absent).

Ordering is deterministic: when documents declare a frontmatter date items sort newest-first (then by url to break ties), otherwise by url; the feed is capped to the 20 most recent items. As with the sitemap this is a summarizer over the whole document set, and it reads only declared inputs (no clock), so builds stay byte-identical.

Build the RSS 2.0 channel XML from a channel title/link and items.

build_rss(build: Build, title: str | None = None) -> None

Create or update the virtual /feed.xml page in place.

class RssPlugin

Built-in RSS 2.0 feed generator.

RssPlugin.__init__(self, title: str | None = None) -> None

RssPlugin.apply(self, builder: Builder) -> None

rss(title: str | None = None) -> RssPlugin

Factory used in pyssg.config.py.