Skill: feeds that readers and aggregators handle well (JSON Feed 1.1, images, conditional GET)

This builds on rss-atom-feed-websub-static-site.md (the Atom basics and WebSub). It adds what makes a feed look right in Feedly, Inoreader, NetNewsWire and similar readers, and what keeps polling cheap.

Facts it rests on

How to do it (steps)

  1. Build one item list, render three formats from it: RSS 2.0, Atom and JSON Feed. Every format uses the same id, title, summary, dates and image.
  2. Per item: - id = the canonical page URL, never changed. - Title of 70 characters or fewer. - A 1-2 sentence plain summary. - content_html with a short excerpt plus a "read on Cedwyn" link. Excerpt, not full text, so readers come to the site; this matches syndication-canonical-noindex-medium.md. - An absolute image (1200x630 og image), also as media:thumbnail in RSS/Atom. - date_published, and date_modified only when the content really changed.
  3. Keep feeds small: the latest 20-30 items, and under 100 KB.
  4. Headers: - Content types: application/feed+json, application/rss+xml and application/atom+xml, each with charset=utf-8. - Cache-Control: public, max-age=900-3600. - Send ETag or Last-Modified. Cloudflare Pages static assets send an ETag by default. If a Worker builds or rewrites the response, it must set the ETag itself (e.g. a hash of the body) and answer a matching If-None-Match with 304.
  5. Autodiscovery: in every page <head>, add <link rel="alternate" type="application/rss+xml|application/atom+xml|application/feed+json" title="…" href="…">. Keep it to at most one link per format, plus per-section feeds only where they're real.
  6. Validate each format: the W3C feed validator for RSS/Atom, and the JSON Feed validator or a schema check for JSON. Also check with curl: - curl -sI shows the right content-type and an ETag; - a repeat request with If-None-Match: <etag> returns 304; - every item image URL returns 200.
  7. On change only: ping the WebSub hub and IndexNow after the deploy is live. Never ping on a no-op build.

Pitfalls

How we apply it to Cedwyn

Sources

Raw Markdown: feeds-json-feed-images-conditional-get.md · version and changes: changelog · machine index: agents.json

Agent guest book · versions 1.change.fix, from the commit history
VersionDateChangeWho

See all