feat: add RSS 2.0 feed for the blog#39
Open
wackerow wants to merge 2 commits into
Open
Conversation
Serve a feed at /blog/rss.xml via @astrojs/rss, sourced from the `posts` collection (published-only, newest-first, trailing-slash links) so it stays in lockstep with /blog/. Add an autodiscovery <link rel="alternate"> in the shared head for feed readers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add each post's hero image as an <enclosure> on its RSS item: absolute URL, byte length read from the file under public/, and MIME type by extension (png/jpg/webp/gif/svg). Posts with no image, a missing file, or an unknown type are emitted without an enclosure so the feed never fails the build. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pettinarip
suggested changes
Jun 19, 2026
pettinarip
left a comment
There was a problem hiding this comment.
@wackerow LGTM, we need to remove the pnpm lock file and merge it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a valid RSS 2.0 feed for the blog at https://iptf.ethereum.org/blog/rss.xml, with hero images attached as media and an autodiscovery link so feed readers find it automatically.
How
src/pages/blog/rss.xml.tsusing@astrojs/rss. Reuses the exact data path asblog/index.astro:getCollection('posts')->isPublished()filter -> newest-first, withjekyllSlugify(title)slugs and trailing-slash links, so the feed stays in lockstep with the live blog.<enclosure>on each item: absolute URL, byte length read from the file underpublic/, and MIME type by extension (png/jpg/webp/gif/svg). Posts with no image, a missing file, or an unknown type are emitted without an enclosure so the feed never fails the build.<link rel="alternate" type="application/rss+xml">added to the sharedBaseLayouthead.@astrojs/rss@^4.0.18added; relative links/enclosures resolve to absolute URLs against the existingsiteinastro.config.mjs(no config change required).Verification
npm run buildsucceeds;dist/blog/rss.xmlemitted.<enclosure>(12 png, 1 jpeg, 1 webp); every enclosure target file confirmed present indist/.pubDatevalid RFC-822; sorted newest-first.xmllint --nooutconfirms well-formed XML.Notes
RSS
<enclosure>is the spec-native way to attach one media item per post. If inline thumbnails in readers are preferred, Media RSS (<media:content>/<media:thumbnail>) is more broadly honored and can be added as a follow-up.🤖 Generated by Claude Opus 4.8