feat: Add tag/category support to all feed formats (v1.3.1)
Implements tag/category rendering in RSS 2.0, Atom 1.0, and JSON Feed 1.1 syndication feeds. Tags added in v1.3.0 are now visible to feed readers. Changes: - Load tags in feed generation (_get_cached_notes) - Add <category> elements to RSS 2.0 feeds - Add <category term/label> to Atom 1.0 feeds - Add "tags" array to JSON Feed 1.1 items - Omit empty tags field in JSON Feed (minimal approach) Standards compliance: - RSS 2.0: category element with display name - Atom 1.0: RFC 4287 category with term and label attributes - JSON Feed 1.1: tags array of strings Per design: docs/design/v1.3.1/feed-tags-design.md Implementation: docs/design/v1.3.1/2025-12-10-feed-tags-implementation.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -178,6 +178,11 @@ def generate_atom_streaming(
|
||||
# Link to entry
|
||||
yield f' <link rel="alternate" type="text/html" href="{_escape_xml(permalink)}"/>\n'
|
||||
|
||||
# Add category elements for tags (v1.3.1)
|
||||
if hasattr(note, 'tags') and note.tags:
|
||||
for tag in note.tags:
|
||||
yield f' <category term="{_escape_xml(tag["name"])}" label="{_escape_xml(tag["display_name"])}"/>\n'
|
||||
|
||||
# Media enclosures (v1.2.0 Phase 3, per Q24 and ADR-057)
|
||||
if hasattr(note, 'media') and note.media:
|
||||
for item in note.media:
|
||||
|
||||
Reference in New Issue
Block a user