Skip to content

Conversation

@shigahi
Copy link
Collaborator

@shigahi shigahi commented Jan 22, 2026

Summary

Add automatic RSS feed generation at /rss.xml endpoint.

Closes #30

Changes

Worker Code (src/code.ts)

  • Add RssOptions interface with enabled, title, description, and language fields
  • Add RSS configuration constants (RSS_ENABLED, RSS_TITLE, RSS_DESCRIPTION, RSS_LANGUAGE)
  • Implement generateRssFeed() function that generates RSS 2.0 XML
  • Implement escapeXml() helper function for proper XML escaping
  • Add /rss.xml endpoint handler that returns the RSS feed when enabled

UI (src/App.tsx)

  • Add RSS state management with useState<RssOptions>
  • Add RSS configuration section in Advanced Settings:
    • Enable RSS toggle
    • Feed title input (defaults to domain)
    • Feed description input
    • Language selector (en-us, en-gb, ja, de, fr, es, zh-cn, zh-tw, ko)

RSS Feed Features

  • RSS 2.0 compliant XML format
  • Includes atom:link for self-reference
  • Uses PAGE_METADATA for item titles and descriptions
  • Proper XML entity escaping for special characters
  • Correct Content-Type header (application/rss+xml; charset=utf-8)

Testing

  • Local build passes (npm run build)
  • Generated worker code contains RSS configuration
  • RSS feed endpoint only responds when enabled

- Add RssOptions interface for RSS configuration
- Implement generateRssFeed function generating RSS 2.0 XML
- Add /rss.xml endpoint handler in worker code
- Add RSS configuration UI in Advanced Settings
  - Enable RSS toggle
  - Feed title and description inputs
  - Language selector (en-us, ja, de, fr, es, zh-cn, zh-tw, ko)
@shigahi shigahi merged commit 1f03621 into master Jan 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add RSS feed generation

2 participants