Open
Conversation
Contributor
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
Contributor
Author
|
/bonk please review |
Contributor
|
Approved PR #29200. The changes are clean, well-documented, and pass all validation checks. |
Contributor
|
Preview URL: https://157db81c.preview.developers.cloudflare.com |
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.
Summary
Per-product
llms.txtfiles previously included section index pages whose only content is a<DirectoryListing />component — pages that exist purely as sidebar navigation containers. These pages have no standalone value for an LLM (thellms.txtfile itself already serves as a directory), and they were failing thecontent-start-positionaudit check because 100% of their rendered content is navigation links.This adds an
isDirectoryOnlyPage()helper that strips imports, component tags, and JSX comments from a page's raw MDX body, then returnstrueif the page contains a<DirectoryListing />with ≤ 250 characters of surrounding prose. Any page matching that condition is excluded from the per-productllms.txtfilter ingetStaticPaths.llms.txtoutputs<DirectoryListing />(>250 chars) are preserved<DirectoryListing />at all are unaffectede.bodyalready loaded in memory bygetCollection/llms.txt(product directory) is unchanged