Skip to content
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

bad relative links in blog feed #1817

Closed
boneskull opened this issue Sep 20, 2018 · 6 comments
Closed

bad relative links in blog feed #1817

boneskull opened this issue Sep 20, 2018 · 6 comments

Comments

@boneskull
Copy link
Contributor

The blog feed (https://nodejs.org/en/feed/blog.xml) has a base "channel link" of https://nodejs.org/en/. Bare anchor links fail to work, e.g., #notable-changes, because they resolve relative to the channel link. For example: https://nodejs.org/en/#notable-changes.

I think the channel link needs to point to https://nodejs.org/<lang>/blog/.

@boneskull
Copy link
Contributor Author

I have spent a bit of time looking in to fixing this, and it's not clear where the fix needs to be:

  • are we missing some metadata somewhere? if so, where? at the collection level, post metadata level, etc?
  • does the channel > link need to change away from the site's root?
  • do we need to add an xml:base somewhere (e.g., on item)?
  • is there a bug in metalsmith-feed?

But I have confirmed it's not a reader-specific bug, because I've reproduced the behavior on multiple readers.

@fhemberger
Copy link
Contributor

fhemberger commented Nov 1, 2018

@boneskull Sorry it took a while to look into this.

site.url should be https://nodejs.org/<lang>/blog/ instead of https://nodejs.org/<lang>/ only for the RSS feeds. Unfortunately, we can't pass a custom value as parameter. This is actually an issue in metalsmith-feed, maybe you can raise an issue there.

See: https://github.com/hurrymaplelad/metalsmith-feed/blob/master/metalsmith_feed.js#L27

@boneskull
Copy link
Contributor Author

@fhemberger Is this worth bothering with? Wondering if we are hitching our wagon to Metalsmith for the foreseeable future, or whether a next-generation nodejs.org site would use different tech...

@fhemberger
Copy link
Contributor

I don't know. Might still be worth reporting, also for the sake of others. But I'll leave that up to you.

@ghost
Copy link

ghost commented Nov 3, 2018

I think the channel link needs to point to https://nodejs.org/<lang>/blog/

@boneskull:Now it doesn't seem we should translate blogs into other langs. So the default url will be directed to https://nodejs.org/en/blog/. :)

@fhemberger
Copy link
Contributor

@boneskull I'm closing this issue for now. Feel free to open one for metalsmith-feed, we are happy to accept a PR once it's fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants