Expand description
RSS 2.0, Atom 1.0 and JSON Feed 1.1 for a site’s one content stream.
A site gets exactly one feed, served in all three formats. Which entries it
holds is passed in rather than derived: a blog is a
dynamic_page_group, and a
dynamic page builds its template data per request, so there is nothing to
harvest at boot.
Three properties are load-bearing and easy to break:
- The documents are byte-stable.
<lastBuildDate>and<updated>come from the newest entry, never from the clock, and ties break on path. A timestamp or a map iteration order in the body would change the bytes on every deploy, and every subscriber would re-download a feed that did not change. - Content is rewritten, not copied. See [
rewrite]. - Text is escaped by the writer.
quick_xml::events::BytesText::newescapes; nothing here hand-rolls it. What escaping cannot fix — characters outside XML’sCharproduction — is stripped in [sanitize].
Structs§
- Feed
- A site’s one feed.
- Feed
Document - One rendered feed document.
- Feed
Entry - One item in a feed.
- FeedSet
- All three documents, plus what they share.
- Feed
Site - Channel-level metadata, all of it derived from what the site already declares rather than configured a second time.
Enums§
- Feed
Error - Why a feed could not be produced.
Constants§
- ATOM_
PATH - Where the Atom 1.0 document is served.
- FEED_
MAX_ AGE_ SECONDS - How long a feed may be served from a cache before revalidating.
- JSON_
PATH - Where the JSON Feed 1.1 document is served.
- MAX_
FEED_ ENTRIES - How many entries a feed carries, newest first.
- RSS_
PATH - Where the RSS 2.0 document is served.
Functions§
- build_
feeds - Builds all three feed documents.