Hwaro::Content::Seo::Feeds
Constants
[feeds] type values the writer knows, and the file each one
publishes when filename is left empty.
User template keys that override the built-in feed output, per feed
type. templates/rss.xml.jinja loads under the key "rss.xml"
(template keys strip only the final template extension).
Class methods
Template context for user feed templates. Everything a feed body
needs is precomputed here with the same helpers the programmatic
generators use (URLs absolute + percent-encoded, dates normalized
and preformatted), so a template never has to re-derive feed
semantics — XML escaping via the xml_escape filter is the
template author's job.
Keep the page the build actually wrote when two pages collide on one URL (path-sort-first winner, matching render.cr#compute_output_url_winners). Used for main, section, language, and taxonomy feeds so no surface advertises a loser.
A page the build refused to write at all (output_suppressed: a
URL that traverses out of the output directory, a collision loser
already flagged upstream) is dropped first — its URL is unique, so
the URL dedupe alone let /posts/../../escape/ into every section
and taxonomy feed while sitemap/search/llms correctly omitted it.
The language a feed declares (RSS <language>, Atom xml:lang,
JSON language): a non-default language's code. Default-language
feeds declare none, like the main site feed, so section and term
feeds under /ko/ say ko exactly as /ko/rss.xml does.
Safe subdirectory under output_dir for a section/lang/taxonomy
feed. Returns nil (and warns) when the URL escapes the public tree.
Returns every feed file this build publishes: the ones written, or,
when skipped as unchanged, the ones already on disk
(published_outputs).
JSON Feed 1.1 (https://www.jsonfeed.org/version/1.1/). Same inputs
and helpers as the RSS/Atom writers: summary mirrors RSS
<description>, and the body follows Atom's <content> choice —
content_html for full HTML, content_text when full_content is
off or truncate > 0 (an item must carry one of the two).
Every main, section and per-language feed file the current config
and page set publish. The builder claims these whether generate
wrote them or skipped as unchanged, so a warm --cache build (or a
serve rebuild) removes a feed an earlier config published: [feeds]
disabled, generate_feeds turned off on a section, a language's
generate_feed dropped, a renamed feed file. Planned by the same
each_feed the writer walks, so the two cannot drift. Taxonomy
feeds are claimed by the taxonomy generator.