-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat: add RSS 2.0 feed for blog #7810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Implement RSS 2.0 feed generator using the 'feed' library. - Add src/utilities/rss.mjs to handle blog post to XML mapping. - Add unit tests in src/utilities/rss.test.mjs to verify feed structure. - Manually verified XML output via local development server. Note: Local Jest execution encountered ESM import issues, but the core logic was validated by running the utility directly with Node.js.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
alexander-akait
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How it is integrated with our site?
|
Thanks for the review, Alex :) Currently, this is a standalone utility with unit tests. To fully integrate it, I plan to:
Does the team have a preferred build hook or location where I should trigger this script? |
|
Just script generation |
|
Got it. I've added the |
|
Btw, currently the script generates |
|
|
||
| _This document is an adaption of the Node.js project [Working Groups Charter](https://github.com/nodejs/TSC/blob/main/WORKING_GROUPS.md)_ | ||
|
|
||
| [Technical Steering Committee (TSC)]: ./CHARTER.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these files from PR, it is not related, if you use AI to generate code you should understand what are you doing and why and where
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. I apologize for the oversight. I've removed the unrelated files and will be much more careful to ensure only relevant changes are included. Thanks for the catch.
| } catch (err) { | ||
| console.error("❌ Error generating feed:", err); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see code here to generate our blog posts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Explicitly source blog posts from the `blog/` directory. - Improve error handling for files without proper date prefixes. - Ensure all items are sorted chronologically based on their filenames.
- Install cross-env to handle NODE_OPTIONS across Windows/Mac/Linux (required for Jest ESM support with --experimental-vm-modules)

Summary
Closes #7808
This PR implements a standalone RSS 2.0 feed generation utility for the Webpack blog.
Currently, there is no automated way for users to subscribe to new blog posts via RSS. This utility maps blog post data to a valid RSS XML structure using the feed library.
I have manually verified that the script correctly generates an rss.xml file, and I've confirmed it renders properly in the browser with all required fields (title, link, description, pubDate).
What kind of change does this PR introduce?
feat
Did you add tests for your changes?
Yes, I have added unit tests in
src/utilities/rss.test.mjsusing Jest.All tests have been verified to pass both locally and in the CI environment.
Does this PR introduce a breaking change?
No. This is a new utility that does not affect existing build processes or features.
If relevant, what needs to be documented once your changes are merged or what have you already documented?
The new RSS feed URL (e.g.,
/rss.xml) should be mentioned in the Blog section of the documentation so users know where to find the subscription link.