-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
fix(blog): Fix homepage link in RSS feed #8089
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
cc @nodejs/nodejs-website we should add a description to our |
| language: 'en', | ||
| link: `${canonicalUrl}/feed/${file}`, | ||
| description: description, | ||
| link: `${canonicalUrl}/`, |
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.
| link: `${canonicalUrl}/`, | |
| link: canonicalUrl, |
avivkeller
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.
Wow! This was simple, informative, and an overall great PR. Keep up the good work, @Krinkle!
|
(Relevant spec details: https://www.rssboard.org/rss-specification#requiredChannelElements) |
good idea |
|
Lighthouse Results
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8089 +/- ##
==========================================
- Coverage 73.20% 73.12% -0.08%
==========================================
Files 97 97
Lines 8448 8440 -8
Branches 227 229 +2
==========================================
- Hits 6184 6172 -12
- Misses 2263 2267 +4
Partials 1 1 ☔ View full report in Codecov by Sentry. |
|
@Krinkle can you resolve the failed test? |
|
Sorry, it took me a while to find what the problem was because the CI job output just says "Command failed with exit code 1" with no discernable information about what or why failed. I closed and re-opened the PR as a way to retry the jobs, on the assumption it was some kind of race condition. Anyway, I see that the code coverage bot is doubling as test result reporter. Fix incoming. |
When following the Node.js Blog at https://nodejs.org/en/blog in a feed reader like NetNewsWire, the homepage link gets broken. Instead of navigating the browser to the website, one gets a blank page and an unexpected RSS feed download in the background. The `<link>` tag in RSS 2.0 is for the HTML website. Note that the "self" link from the RSS file back to itself is separate form this and already auto-generated by the Feed class. [1] While at it, fix the broken `<description>undefined</defined>` element. This is often left empty and fine not to pass in `/apps/site/site.json`. However, the upstream Feed class has a bug where it takes the undefined and outputs the string "undefined" as the blog's description instead of a sensible default like empty string. [1]: https://github.com/jpmonette/feed Signed-off-by: Timo Tijhof <krinkle@fastmail.com>
Description
When following the Node.js Blog at https://nodejs.org/en/blog in a feed reader like NetNewsWire, or when sharing a blog roll via OPML (example), the homepage link gets broken.
Instead of navigating the browser to the website, one gets a blank page and an unexpected RSS feed download in the background.
The
<link>tag in RSS 2.0 is for the HTML website. The "self" link for the RSS file itself is already generated by jpmonette/feed package.While at it, fix the broken
<description>undefined</defined>element. This is often left empty and fine not to pass in/apps/site/site.json. However, the upstream Feed class has a bug where it takes the undefined and outputs the string "undefined" as the blog's description instead of a sensible default like empty string.Validation
<?xml version="1.0" encoding="utf-8"?> <rss version="2.0"> <channel> <title>Node.js Blog</title> - <link>https://nodejs.org/en/feed/blog.xml</link> - <description>undefined</description> + <link>https://nodejs.org/en/</link> + <description></description>Related Issues
Check List
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.