fix(docs): create placeholder section for python-docs to preserve navigation structure #11789
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.
Description
Refs: Related fern-platform PR: fern-api/fern-platform#6604
Fixes the navigation issue where the sidebar disappears when entering Python library docs API reference pages. The CLI now creates a placeholder
SectionNodeat the exact position wherepython-docsis defined in the navigation YAML, which FDR can find by slug suffix match and replace with the actual library docs content.Link to Devin run: https://app.devin.ai/sessions/12c061bbb9af4494ad68657c7285342b
Requested by: paarth@buildwithfern.com
Changes Made
PythonDocsSectionHandlerreturn type fromPageNode | nulltoSectionNode | nullcreatePythonDocsSectionPlaceholderto return aSectionNodewith emptychildrenarraypythonDocsSectionHandlerinpublishDocs.tsthat creates a placeholder section during the publish flowTesting
Human Review Checklist
SectionNodestructure has all required fields (id, type, slug, title, children, etc.)__libdocs_placeholder_${urlSlug}__matches FDR expectations in fern-platform#6604slug.endsWith(libraryDocsSlug))