镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(docs): benchmark index links 404 - #5587

Merged
thomhurst merged 1 commit into
mainfrom
fix/benchmark-doc-links
Apr 17, 2026
Merged

thomhurst merged 1 commit into
mainfrom
fix/benchmark-doc-links

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Summary

  • Bare relative links on /docs/benchmarks/ index resolved to /docs/<Name> (404) instead of /docs/benchmarks/<Name>.
  • Switched links to ./<Name>.md so Docusaurus resolves to the sibling route.
  • Updated both generator scripts (process-benchmarks.js, process-mock-benchmarks.js) and regenerated index.md files so CI regenerations keep the fix.

Fixes #5585

Test plan

  • Verify links on https://tunit.dev/docs/benchmarks/ point to /docs/benchmarks/AsyncTests etc.
  • Verify mock benchmark links at /docs/benchmarks/mocks/ resolve correctly.

Bare relative links like `[AsyncTests](AsyncTests)` resolved to
`/docs/AsyncTests` instead of `/docs/benchmarks/AsyncTests`. Use
`./Name.md` form so Docusaurus resolves to the sibling route.

Fixes #5585

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

Overall: Clean, minimal, correct fix. Approved.

What the PR does

Bare Markdown links like [AsyncTests](AsyncTests) in Docusaurus are resolved relative to the site root, producing /docs/AsyncTests (404). Switching to ./AsyncTests.md instructs Docusaurus to resolve relative to the current file's directory, yielding the correct /docs/benchmarks/AsyncTests route.

Assessment

The change is correct and well-scoped:

  • Root cause addressed — both generator scripts (process-benchmarks.js, process-mock-benchmarks.js) are updated, so CI regenerations will preserve the fix rather than reverting it.
  • Generated files regenerated — index.md and mocks/index.md are committed in the same PR, keeping the repo consistent immediately.
  • No over-engineering — the minimal ./Name.md form is the canonical Docusaurus recommendation for relative sibling links; nothing more is needed.

Minor observation (non-blocking)

Both generator scripts still produce a trailing blank line between the runtime benchmarks list and the "Build Benchmarks" section (the template literal leaves a double newline). This is a pre-existing cosmetic quirk unrelated to this fix and not worth changing here.

No issues found. This is a straightforward, correct documentation fix.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@thomhurst
thomhurst merged commit 90bdbd0 into main Apr 17, 2026
12 of 15 checks passed
@thomhurst
thomhurst deleted the fix/benchmark-doc-links branch April 17, 2026 10:44
This was referenced Apr 17, 2026

This branch was successfully deployed

No deployments
Pull Requests — a444328b Deployed Apr 17, 2026 by thomhurst via modularpipeline (windows-latest) #17203
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.

[Bug]: (docs) benchmark links go to 404

1 participant