Skip to content

Conversation

@Krinkle
Copy link
Contributor

@Krinkle Krinkle commented Aug 18, 2025

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

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run pnpm format to ensure the code follows the style guide.
  • I have run pnpm test to check if all tests are passing.
  • I have run pnpm build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@Krinkle Krinkle requested a review from a team as a code owner August 18, 2025 20:24
@vercel
Copy link

vercel bot commented Aug 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nodejs-org Ready Ready Preview Aug 22, 2025 2:58pm

@Krinkle Krinkle changed the title fix(blog): Fix homepage link in rss feed fix(blog): Fix homepage link in RSS feed Aug 18, 2025
@avivkeller
Copy link
Member

cc @nodejs/nodejs-website we should add a description to our site.json

language: 'en',
link: `${canonicalUrl}/feed/${file}`,
description: description,
link: `${canonicalUrl}/`,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
link: `${canonicalUrl}/`,
link: canonicalUrl,

Copy link
Member

@avivkeller avivkeller left a 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!

@avivkeller
Copy link
Member

@AugustinMauroy
Copy link
Member

cc @nodejs/nodejs-website we should add a description to our site.json

good idea

@avivkeller avivkeller added the github_actions:pull-request Trigger Pull Request Checks label Aug 20, 2025
@avivkeller avivkeller enabled auto-merge August 20, 2025 20:46
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Aug 20, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Aug 20, 2025

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 93 🟢 100 🟢 100 🟢 100 🔗
/en/about 🟢 100 🟢 97 🟢 100 🟠 88 🔗
/en/about/previous-releases 🟢 99 🟢 93 🟢 100 🟠 89 🔗
/en/download 🟢 95 🟢 100 🟢 100 🟢 100 🔗
/en/blog 🟢 100 🟢 100 🟢 96 🟢 100 🔗

@codecov
Copy link

codecov bot commented Aug 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.12%. Comparing base (f7e9126) to head (674b974).
⚠️ Report is 17 commits behind head on main.
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

@avivkeller avivkeller disabled auto-merge August 20, 2025 20:49
@avivkeller
Copy link
Member

@Krinkle can you resolve the failed test?

@Krinkle Krinkle closed this Aug 21, 2025
@Krinkle Krinkle reopened this Aug 21, 2025
@Krinkle
Copy link
Contributor Author

Krinkle commented Aug 21, 2025

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.

> @node-core/website@ test:unit /home/runner/work/nodejs.org/nodejs.org/apps/site
> cross-env NODE_NO_WARNINGS=1 node --experimental-test-coverage --test-coverage-exclude=**/*.test.* --experimental-test-module-mocks --enable-source-maps --import=global-jsdom/register --import=tsx --import=tests/setup.jsx --test **/*.test.*

 ELIFECYCLE  Command failed with exit code 1.
Error:  command finished with error: command (/home/runner/work/nodejs.org/nodejs.org/apps/site) /home/runner/setup-pnpm/node_modules/.bin/pnpm run test:unit exited (1)

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>
@avivkeller avivkeller added the github_actions:pull-request Trigger Pull Request Checks label Aug 22, 2025
@avivkeller avivkeller enabled auto-merge August 22, 2025 15:05
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Aug 22, 2025
@ovflowd ovflowd disabled auto-merge August 25, 2025 17:25
@ovflowd ovflowd merged commit 65b4a8f into nodejs:main Aug 25, 2025
14 of 15 checks passed
@Krinkle Krinkle deleted the patch-1 branch August 25, 2025 19:47
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.

5 participants