Skip to content

fix: build apiDocMd / agentDocs README so breadcrumbs resolve (#1324) - #1325

Merged
isamu merged 1 commit into
mainfrom
fix/docs-readme-404
Jun 3, 2026
Merged

isamu merged 1 commit into
mainfrom
fix/docs-readme-404

Conversation

@isamu

@isamu isamu commented Jun 3, 2026 •

Copy link
Copy Markdown
Member

Closes #1324

Summary

Two pages on the live docs site return 404 because VitePress excluded every `README.md` from the build, but the typedoc-generated pages link back to them in their breadcrumb:

(Compare with sibling pages that work: `/apiDocMd/globals.html`, `/agentDocs/llm/groqAgent.html`.)

Items to Confirm / Review

  1. Scope of the README change: replacing the wildcard with two explicit excludes keeps `docs/README.md` and `docs/examples/tutorial/README.md` out of the public site while exposing only the two auto-generated index READMEs. Flag if either of the kept-private READMEs should also be public, or vice versa.
  2. No content edits: the fix is purely in `docs/.vitepress/config.mts`. The README.md files themselves are unchanged; they were already in the repo, just unbuildable.
  3. Verified locally with `yarn build` under `docs/` — the two target pages now generate; the dev-only ones still don't.

User Prompt

公式ドキュメントを読んでいる時に気づきましたが、ReadMeが404になっているようです:

docs以下のことです。

Root cause

`docs/.vitepress/config.mts` had:

```ts
srcExclude: [
...,
"**/README.md", // ← excludes every README.md in the entire tree
...
],
```

But typedoc breadcrumbs at the top of every generated page point back to README.md:

```md

docs/apiDocMd/classes/GraphAI.md

graphai
```

```md

docs/apiDocMd/globals.md

graphai
```

Clicking those breadcrumbs lands on a path that VitePress refused to build, hence the 404s.

Fix

Replace the wildcard with explicit per-file excludes:

```diff
srcExclude: [
...,

  • "**/README.md",
  • // NOTE: do not exclude README.md globally -- the typedoc-generated pages
  • // under apiDocMd/ and agentDocs/ link back to their respective README.md
  • // as the breadcrumb. Exclude only the dev-only READMEs so the auto-doc
  • // breadcrumbs resolve on the live site.
  • "./README.md",
  • "./examples/tutorial/README.md",
    ...
    ],
    ```

Result after `yarn build` under `docs/`:

File Built? Intent
`.vitepress/dist/apiDocMd/README.html` ✅ yes linked from typedoc breadcrumbs
`.vitepress/dist/agentDocs/README.html` ✅ yes agent index, also linked from `document_generation.md`
`.vitepress/dist/README.html` ❌ no dev-only, kept out of site
`.vitepress/dist/examples/tutorial/README.html` ❌ no tutorial source, kept out of site

Test plan

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Resolved 404 errors preventing access to API documentation and agent documentation pages.
  • Documentation

    • Added documentation outlining the fix applied.

…1324)

VitePress was excluding **every** README.md via the "**/README.md" glob in
srcExclude, but the typedoc-generated pages under apiDocMd/ and agentDocs/
contain breadcrumb links pointing back to their README.md
(e.g. apiDocMd/classes/GraphAI.md starts with `[**graphai**](../README.md)`).
On the live site those links resolved to 404:

- https://graphai.info/apiDocMd/README.html
- https://graphai.info/agentDocs/README.html

Replace the global wildcard with explicit per-file excludes so the two
auto-generated index READMEs do build, while keeping the dev-only ones
(docs/README.md, docs/examples/tutorial/README.md) out of the site.

Verified by running `yarn build` under docs/:
  - .vitepress/dist/apiDocMd/README.html        created
  - .vitepress/dist/agentDocs/README.html       created
  - .vitepress/dist/README.html                 NOT created (still excluded)
  - .vitepress/dist/examples/tutorial/README.html  NOT created (still excluded)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d3e9db9d-564f-4d80-ad97-0fba8728f0b6

📥 Commits

Reviewing files that changed from the base of the PR and between 6caaf0e and 3b7f806.

📒 Files selected for processing (2)
  • docs/.vitepress/config.mts
  • plans/fix-docs-readme-404.md

📝 Walkthrough

Walkthrough

This PR fixes 404 errors on apiDocMd/README.html and agentDocs/README.html by refining the VitePress srcExclude configuration from a global README.md wildcard exclusion to targeted exclusions of only two developer-facing files, enabling typedoc-generated index pages to build while keeping dev-only READMEs private.

Changes

README.html Accessibility Fix

Layer / File(s) Summary
Planning and validation documentation
plans/fix-docs-readme-404.md
Explains the root cause (overly broad README.md exclusion preventing typedoc-generated pages from building), specifies the fix (exclude only ./README.md and ./examples/tutorial/README.md), and provides validation steps to confirm expected HTML outputs exist.
VitePress srcExclude configuration
docs/.vitepress/config.mts
Replaces "**/README.md" wildcard exclusion with explicit per-file excludes (./README.md, ./examples/tutorial/README.md), with comments explaining the behavior supports typedoc breadcrumb linking.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A rabbit hops through broken links with care,
Those READMEs were hiding everywhere!
"Just two shall hide," the config now declares,
While typedoc's paths find open stairs. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: fixing 404 errors on the apiDocMd and agentDocs README pages by updating the VitePress configuration to allow breadcrumbs to resolve.
Linked Issues check ✅ Passed The pull request directly addresses issue #1324 by replacing the global '**/README.md' exclusion with specific exclusions of './README.md' and './examples/tutorial/README.md', allowing auto-generated README pages to build.
Out of Scope Changes check ✅ Passed All changes are in scope: the config.mts modification targets the documented fix, and the plans file documents the solution without introducing unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/docs-readme-404

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@isamu
isamu merged commit 2730e21 into main Jun 3, 2026
11 checks passed
@isamu
isamu deleted the fix/docs-readme-404 branch June 3, 2026 07:04
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.

docs: README.html under apiDocMd / agentDocs returns 404

1 participant