Skip to content

Write the RSS feed directly instead of through the feed package - #45

Merged
negz merged 1 commit into
modelplaneai:mainfrom
jbw976:license-clean
Oct 30, 2026
Merged

negz merged 1 commit into
modelplaneai:mainfrom
jbw976:license-clean

Conversation

@jbw976

@jbw976 jbw976 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

What and why

The RSS feed is built with the feed package, which pulls in the sax package. sax is licensed under BlueOak-1.0.0, which would be good to remove from the site's dependencies since it's not an explicitly approved license and I haven't seen any exceptions granted for it yet.

This PR basically builds the RSS 2.0 XML manually in pages/feed.xml.tsx and drops the feed package dependency. This logic is not very complex, so I've opted to implement it directly inline, which I think is a reasonable trade-off here for fewer possible license headaches.

I've verified with a locally built site that the RSS output stays exactly the same against the live production site, except for two things: the lastBuildDate timestamp, which is set on every request, and the channel's <generator> element, because that named/credited the feed package, which we aren't using anymore. We no longer emit this element.

I will also compare the RSS feed output on the vercel preview site when that's ready.

Checklist

  • Ran npm run lint and npm run build locally.
  • Ran npm run validate-posts if I changed blog content.
  • Signed off my commits with git commit -s.

The RSS feed is built with the feed package, which pulls in sax through
xml-js. sax is licensed under BlueOak-1.0.0, which would be good to remove
from the site's dependencies since it's not an approved license.

This commit builds the RSS 2.0 XML in pages/feed.xml.tsx and drops feed. The
output keeps the same channel fields, items, ordering, and indentation, with
titles and descriptions in CDATA and all other text XML-escaped. The channel's
<generator> element named the feed package, so it was also removed.

Signed-off-by: Jared Watts <jbw976@gmail.com>
@jbw976

jbw976 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Now that the Vercel preview site is up on https://modelplane-n70md9v7r-upboundio.vercel.app/, I compared the preview's feed against the live prod site feed.

They match exactly, except for the differences we expected:

  • lastBuildDate, which is set on every request
  • the <generator> element, which this PR removes

But there's also a v0.5 blog post that shows up in the preview site feed, probably because that post still has draft: true. I imagine that is oversight?

Every other post comes through the same, e.g. with the same fields and ordering 🙌

@negz negz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't read typescript well but I can't see any obvious issues.

@negz
negz merged commit 7a6cf99 into modelplaneai:main Oct 30, 2026
2 checks passed

This branch was successfully deployed

1 active deployment
Preview — 298eafc3 Deployed Oct 30, 2026 by vercel[bot]
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.

2 participants