fastify / website

https://fastify.dev/
MIT License
60 stars 59 forks source link

Inconsistent trailing slash, broken links #157

Closed camsteffen closed 9 months ago

camsteffen commented 11 months ago

Throughout the website, if you navigate your browser directly to a webpage (e.g. refresh the page or click a google result), it will redirect to having a trailing slash. However, if you navigate to any page using the website's internal navigation, it will not have a trailing slash. The docs pages include relative links which only work if the current page does not have a trailing slash. So if you follow a google result to a docs page and then click a relative link, it leads to a "Page Not Found".

Steps to Reproduce

  1. Open https://fastify.dev/docs/latest/Guides/Getting-Started/ (possibly following a google result)
  2. Click the link "the hitchhiker's guide to plugins" within the page (not the nav link)

Expected Behavior

The link works

gioboa commented 10 months ago

The MD file has a link with ./ and if in the url has the trailing slash the link is different.

Screenshot 2023-10-26 at 21 44 42

I think we need to enable the trailing slash in the configuration to have a unique behaviour and manage the errors