Repository navigation
Conversation
Projects with multiple guides declare extra sections (a second guide, a second API reference) in a _readme.yaml at the repo root. The CLI now reads that file and treats each declared section like the built-in one of its kind, across lint, oas:sync, oas:validate and the dev server. The file is optional: a repo without one resolves to the built-in sections and behaves exactly as before. lint also gains a config rule that validates _readme.yaml with the same rules ReadMe applies, and warns about a folder that is laid out like a section but is not declared.
Contributor
[Medium impact] The PR appears safe to merge; the previous finding is fixed and no new blocking issues were found. Reviews (2) · Last reviewed commit: "fix(lint): don't read inherited Object p..." · Reviewed by Greptile |
A declared section named `constructor` is a valid directory, but a bare lookup on the built-in kinds table found Object.prototype.constructor and reported it as a built-in with an impossible kind. The lint summary had the same lookup for its section labels.
Unknown properties and kinds make ReadMe ignore the whole file, so they are errors now rather than warnings, as is a navigation that isn't a list. lint --fix repairs an unquoted number used as a directory or slug, a built-in directory declared with the wrong kind, and duplicate entries. Edits are made on the file's lines to keep comments, and only written when the result re-parses to exactly the intended config.
greptile-apps
Bot
dismissed
their stale review
November 23, 2026 17:24
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
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.
What
Multiple guides is shipping soon: a project can declare extra sections (a second guide, a second API reference) in a
_readme.yamlfile at the repo root. Until now the CLI only knew the built-in directories, so anything in a declared section was invisible to it.The CLI now reads this file and treats each declared section like the built-in one of its kind.
The file is optional. A repo without one resolves to the built-in sections and behaves exactly as it did before, with no new warnings.
Changes
lint: a declared guide gets the same checks asdocs/, a declared reference the same asreference/(frontmatter, ordering, duplicates, nesting, links, components, content).doc:links resolve across all sections.oas:sync/oas:validate/ OAS lint rules: cover specs in every reference section, not justreference/. Results gain asectionfield; existing fields are unchanged.oas:syncchecks every section for symlinks before it writes to any of them.configlint rule: validates_readme.yamlitself, using the same rules gitto applies (directory naming, reserved names, built-ins locked to their kind, duplicates, onehome/version/etc.). It also warns when a top-level folder has an_order.yamlbut nothing declares it, since ReadMe will ignore that folder.dev: the nav uses the declared sections, with the names and order from the file.docs/orreference/._readme.yamlis refused, in line with the other symlink protections.readme-cliskill document the file.dist-ghais rebuilt.An invalid
_readme.yamlis an error, and--fixrepairs what it cangitto ignores the whole file (and falls back to the built-ins) when it holds a property or kind it doesn't recognize, which silently drops every section the file declares. The CLI reports those as errors, matching gitto. One place it's stricter: a
navigationthat isn't a list is an error here, where gitto reads it as empty.lint --fixrepairs the problems with one obvious answer:directoryorsluggets quotedThe edits are made on the file's lines, so comments and layout survive, and the file is only written when the result re-parses to exactly the intended config. A file in a layout the edits don't understand (flow style) is left untouched and the errors stay. Unknown properties, bad directory names and undeclared sections aren't auto-fixed.
Testing
test/sections.test.js;npm run lintis clean.configrule against gitto 9.14.0's realfromYAML+validateConfigon 45 config files: same verdict on 41, and the other 4 are the warn-instead-of-error cases above (plus a non-listnavigation, which gitto reads as empty and the CLI warns about).lint,oas:sync,oas:validateand the bundled Action against a sample repo with a second guide and a second reference, and against a repo with no_readme.yaml.devfrom a packed-and-installed build of an earlier revision of this branch (before rebasing onto 0.5.0) and confirmed the nav, sidebars, pages and OAS previews for declared sections. Not re-run after the rebase.Not covered
v2,de). The CLI can't see those settings, so it doesn't check._readme.yamlwhenever it is present.importstill writes only todocs/andreference/.