Repository navigation
fix: treat INDEX.md and README.md as directory indices - #74
Merged
Merged
Conversation
Docusaurus routes a doc at its parent directory when the file name,
lowercased, is "index", "readme", or the parent directory's name
(isCategoryIndex in @docusaurus/plugin-content-docs). resolveDocumentUrl
stripped only a lowercase "/index", so INDEX.md, Index.md and README.md
failed to match their real route, fell back to the filename heuristic,
and emitted URLs that 404.
Match Docusaurus in both the route-resolution tail and the no-route
fallback. The endsWith('index') guard goes with it: the regex is anchored
to the end of the path, so the guard was already redundant, and it would
have blocked the readme case.
The third convention (<folder>/<folder>.md) was already handled
correctly by collapseMatchingTrailingSegment, which compares lowercased —
so this only brings the other two into line with it.
This was referenced Oct 2, 2026
rachfop
added a commit
that referenced
this pull request
Oct 2, 2026
Fix factual errors found by checking every documented claim against src/: - Default llms.txt links have no .md suffix: addMdExtension applies only with generateMarkdownFiles. - customLLMFiles[].includeUnmatchedLast defaults to true. - Any .md/.mdx import is inlined, @alias/ paths resolve against the site directory, and a circular import is an error that drops the import. - processingBatchSize sets progress-logging granularity; documents are all processed before batching, so it doesn't bound memory. - pathTransformation addPaths inserts after the route base path; the examples now use site-relative paths with docsDir: 'docs'. - Section headings need two or more sections and fall back to path; routeBasePath and blogRouteBasePath are relative to baseUrl. - Root-URL pages map to index.md; sample log output matches the real output; remove the llmsTxtFilename "keep both links" example, which doesn't work. Document behavior that had no docs: how titles and descriptions are chosen (including the #76 skips), directory index handling (#74), the llms-full.txt page structure, draft skipping, and the auto-mode "Version: current" label. Replace the duplicated DocsSection and CustomLLMFile tables in content-generation.md with links to the configuration reference, merge the two overlapping cleaning-combination sections, and drop text that narrated history (the backward-compatibility section, "existing configs are unaffected" caveats). Give every page a front matter description and order the site's llms.txt by the sidebar, so the dogfood llms.txt has full summaries in reading order. Add a Documentation entry to the Unreleased changelog. Co-authored-by: Claude Opus 5.5 <[email protected]>
rachfop
added a commit
that referenced
this pull request
Oct 2, 2026
Fix factual errors found by checking every documented claim against src/: - Default llms.txt links have no .md suffix: addMdExtension applies only with generateMarkdownFiles. - customLLMFiles[].includeUnmatchedLast defaults to true. - Any .md/.mdx import is inlined, @alias/ paths resolve against the site directory, and a circular import is an error that drops the import. - processingBatchSize sets progress-logging granularity; documents are all processed before batching, so it doesn't bound memory. - pathTransformation addPaths inserts after the route base path; the examples now use site-relative paths with docsDir: 'docs'. - Section headings need two or more sections and fall back to path; routeBasePath and blogRouteBasePath are relative to baseUrl. - Root-URL pages map to index.md; sample log output matches the real output; remove the llmsTxtFilename "keep both links" example, which doesn't work. Document behavior that had no docs: how titles and descriptions are chosen (including the #76 skips), directory index handling (#74), the llms-full.txt page structure, draft skipping, and the auto-mode "Version: current" label. Replace the duplicated DocsSection and CustomLLMFile tables in content-generation.md with links to the configuration reference, merge the two overlapping cleaning-combination sections, and drop text that narrated history (the backward-compatibility section, "existing configs are unaffected" caveats). Give every page a front matter description and order the site's llms.txt by the sidebar, so the dogfood llms.txt has full summaries in reading order. Add a Documentation entry to the Unreleased changelog.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #73.
Docusaurus routes a doc at its parent directory when the file name, lowercased, is "index", "readme", or the parent directory's name (isCategoryIndex in @docusaurus/plugin-content-docs). resolveDocumentUrl stripped only a lowercase "/index", so INDEX.md, Index.md and README.md failed to match their real route, fell back to the filename heuristic, and emitted URLs that 404.
Match Docusaurus in both the route-resolution tail and the no-route fallback. The endsWith('index') guard goes with it: the regex is anchored to the end of the path, so the guard was already redundant, and it would have blocked the readme case.
The third convention (/.md) was already handled correctly by collapseMatchingTrailingSegment, which compares lowercased — so this only brings the other two into line with it.