Classes
RSSGenerator
4
▼
Generates RSS/Atom feeds for content syndication.
Creates rss.xml files with recent pages sorted b…
RSSGenerator
4
▼
Generates RSS/Atom feeds for content syndication.
Creates rss.xml files with recent pages sorted by date, enabling readers to subscribe to site updates via RSS readers. Supports i18n per-locale feeds and respects page visibility settings.
Creation: Direct instantiation: RSSGenerator(site)
- Created by PostprocessOrchestrator for RSS generation
- Requires Site instance with rendered pages
Relationships:
- Used by: PostprocessOrchestrator for RSS generation
- Uses: Site for page access and configuration
Features:
- Includes title, link, description for each item
- Sorted by date (newest first)
- Limited to 20 most recent items
- RFC 822 date formatting
- i18n per-locale feeds (if i18n enabled)
- Respects page visibility (draft, rss visibility)
Attributes
| Name | Type | Description |
|---|---|---|
site |
— |
Site instance with pages and configuration |
logger |
— |
Logger instance for RSS generation events |
Methods
generate
0
▼
Generate and write rss.xml to output directory.
Filters pages with dates, sort…
generate
0
▼
def generate(self) -> None
Generate and write rss.xml to output directory.
Filters pages with dates, sorts by date (newest first), limits to 20 items, and writes RSS feed atomically to prevent corruption.
If no pages with dates exist, logs info and skips generation.
Internal Methods 1 ▼
__init__
2
▼
Initialize RSS generator.
__init__
2
▼
def __init__(self, site: SiteLike, collector: OutputCollector | None = None) -> None
Parameters
| Name | Type | Description |
|---|---|---|
site |
— |
Site instance |
collector |
— |
Optional output collector for hot reload tracking Default:None
|