fix(export): honor --docs-only when skipping empty pages - #1523
Draft
cursor[bot] wants to merge 1 commit into
Draft
fix(export): honor --docs-only when skipping empty pages#1523cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Empty grouping pages were always skipped on reference export and never skipped on guides export, because the skip check used the route instead of the documented --docs-only flag. That dropped parent pages from a default reference export and broke export-then-upload hierarchy.
|
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.
馃 Changes
rdme docs exportandrdme reference exportadvertised--docs-only(skip empty non-link pages) but never read the flag. The skip check usedthis.route !== 'guides'instead:rdme reference exportalways dropped empty pages, including parent grouping pages like empty "Users" / "Orders" section headers. A default export-then-upload to a new project lost those parents, so children referenced pages that were never created.rdme docs export --docs-onlywas a no-op; empty guide pages were still written.The skip now follows the documented flag (
default: false). Empty pages are exported unless--docs-onlyis passed. The existing virtual-parent nesting path still applies when the flag is set.馃К QA & Testing
docs exportandreference export.--docs-onlyskips those empty pages.--docs-only(the only way that path is now reached).npx vitest run test/commands/pages/export.test.ts: 24 passed.tscclean.