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

Link broken in documentation TypeScript > Type Providers #197

Open
2 tasks done
danielnmai opened this issue Mar 4, 2024 · 6 comments
Open
2 tasks done

Link broken in documentation TypeScript > Type Providers #197

danielnmai opened this issue Mar 4, 2024 · 6 comments

Comments

@danielnmai
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

4.26.2

Plugin version

No response

Node.js version

18.0

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

14.2.1

Description

The Type Providers link leads to a not found page.
Screenshot 2024-03-04 at 11 02 39 AM
Screenshot 2024-03-04 at 11 04 07 AM

Steps to Reproduce

  1. Go to latest doc on TypeScript support
  2. Click on the Type Providers link
  3. Observe the broken page.

Expected Behavior

The Type Providers page should load correctly.

@matthyk
Copy link

matthyk commented Mar 4, 2024

Should be related to fastify/fastify#5308

@climba03003 climba03003 transferred this issue from fastify/fastify Mar 5, 2024
@matthyk
Copy link

matthyk commented Mar 5, 2024

This problem appears with all documentation versions from Fastify version 4.6.x onwards

@melroy89
Copy link

melroy89 commented Mar 19, 2024

Thanks for reporting I found the same issue. The links itself in markdown are correct, I mean the markdown syntax is correct and the location the link is pointing towards.

Could somebody please take a look at this? I don't know what to do.

For example, this link is broken: https://github.com/fastify/fastify/blob/main/docs/Reference/TypeScript.md?plain=1#L214

The build is showing errors:


 It looks like some of the broken links we found appear in many pages of your site.
Maybe those broken links appear on all pages through your site layout?
We recommend that you check your theme configuration for such links (particularly, theme navbar and footer).
Frequent broken links are linking to:
./Validation-and-Serialization.md/
./Type-Providers.md/
./HTTP2.md/
Logging.md/
./Server.md/#register
./Logging.md/

Exhaustive list of all broken links found:

@melroy89
Copy link

melroy89 commented Apr 8, 2024

I believe something on the TypeScript page (maybe some strange character?) is breaking all the internal links on the Typescript page. Since the broken links are only present in on the TypeScript page.

@sehnsucht13
Copy link

sehnsucht13 commented Apr 27, 2024

This issue is caused by using triple backticks for inline code blocks at the start of a new line. The Typescript.md file in the current release contains one instance and that breaks every relative link after it.

docusaurus' parser can't handle that case. The fix is to avoid using triple backticks for inline code blocks. Using a single backtick for inline code will work without a problem.

That specific instance in Typescript.md was removed in PR 5361. Any future releases should have working relative links on the typescript page. Is there any process for backporting changes to older versions of the docs? Older versions of the 4.x release will stay broken if this is not fixed.

I found one other instance in the current docs where there triple backticks are used for inline code blocks. I'll submit a PR for that to avoid any future issues.

@melroy89
Copy link

Thank you for mentioning this! I accidentally fixed the ts doc page🙏.

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

No branches or pull requests

4 participants