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

docs: fix broken links #907

Merged
merged 6 commits into from
Oct 24, 2024
Merged

docs: fix broken links #907

merged 6 commits into from
Oct 24, 2024

Conversation

tasshi-me
Copy link
Member

@tasshi-me tasshi-me commented Oct 23, 2024

Why

Some relative links in our doc website are broken.

e.g. Stability Index to Versioning Policy

Root cause

There are two root causes: trailing slash and relative URL links.

trailing slash

By default, docusaurus generates /docs/myDoc/index.html for /docs/myDoc.md.
Amplify appends a trailing slash for the URL /docs/myDoc because /docs/myDoc.html doesn't exist.
Finally, accessing /docs/myDoc/ equals /docs/myDoc/index.html.

trailingSlash: true is suitable for Amplify.

relative URL links

Specifying the trailingSlash: true will break some relative links.

We'd better use a file path rather than a URL path described in the reference.

https://docusaurus.io/docs/markdown-features/links

What

  • set trailingSlash: true
  • replace relative URL paths with file paths.

How to test

Preview: https://docs-fix-broken-error.d28lu13lljyj0a.amplifyapp.com/

Checklist

  • Read CONTRIBUTING.md
  • Updated documentation if it is required.
  • Added/updated tests if it is required. (or tested manually)
  • Passed pnpm lint and pnpm test on the root directory.

@tasshi-me tasshi-me marked this pull request as ready for review October 24, 2024 01:23
@tasshi-me tasshi-me requested a review from a team as a code owner October 24, 2024 01:23
@tasshi-me tasshi-me requested review from chihiro-adachi and shabaraba and removed request for a team October 24, 2024 01:23
Copy link
Contributor

@chihiro-adachi chihiro-adachi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

リンク切れ解消されてました(プレビューで確認しました)!
問題ないかと思います。

Copy link
Contributor

@chihiro-adachi chihiro-adachi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMです!

@tasshi-me tasshi-me merged commit 4d889aa into main Oct 24, 2024
29 checks passed
@tasshi-me tasshi-me deleted the docs/fix-broken-error branch October 24, 2024 01:49
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

Successfully merging this pull request may close these issues.

2 participants