fastify/website

Inconsistent trailing slash, broken links

camsteffen opened this issue · 1 comments

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

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