nodejs.org icon indicating copy to clipboard operation
nodejs.org copied to clipboard

canonical md link for 404 page

Open Trott opened this issue 5 years ago • 7 comments

Anyone know why this appears in the source when you get a 404 page on the website?

<link rel="canonical" href="https://nodejs.org/en/404.md/">

The md file does not exist, so...broken link. Should be https://nodejs.org/en/404.html. I haven't spent time trying to find where this is generated, but didn't want to leave it unaddressed so...opening an issue.

Trott avatar Oct 03 '20 14:10 Trott

Nothing obviously pops into my head. But here are my two hunches:

  • Something baked into Metalsmith
  • Something in the nginx config used to do the language detection/fallback in nodejs/build

nschonni avatar Oct 03 '20 15:10 nschonni

This is definitely something in this repo. It looks that 404.md has permalink: false and this causes the issue. Unsure how to work around it.

XhmikosR avatar Feb 14 '21 18:02 XhmikosR

This is still an issue. I'm not sure why it was closed.

Trott avatar Jan 13 '23 23:01 Trott

I was not able to reproduce the outcome on the current version. Maybe someone can enlighten me.

AugustinMauroy avatar Jan 14 '23 10:01 AugustinMauroy

  1. Open https://nodejs.org/fr/foo
  2. <link rel="canonical" href="https://nodejs.org/fr/404.md/"> is in the head, as the issue describes. An MD file that doesn't exist in the repo

nschonni avatar Jan 14 '23 16:01 nschonni

AH! When I did cmd+f '404.md' it told me that there was nothing...

AugustinMauroy avatar Jan 17 '23 08:01 AugustinMauroy

I was not able to reproduce the outcome on the current version. Maybe someone can enlighten me.

That's no reason to close the issue without writing any message.

ovflowd avatar Jan 18 '23 16:01 ovflowd

Canonical links got removed from 404.

ovflowd avatar Mar 12 '23 14:03 ovflowd