feat(cli): add header and footer properties to docs.yml configuration #11359
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 fern-api/fern-platform#6091
Adds support for custom
headerandfooterproperties in docs.yml configuration. These properties accept a relative path to a compiled JavaScript file that exports a custom React component to replace the default header or footer in documentation.Link to Devin run: https://app.devin.ai/sessions/2b482091d11744cfa3111dc19d2f62c2
Requested by: Catherine Deskur (catherine@buildwithfern.com)
Changes Made
0.142.21-2bbd2f7e7which includes the header/footer schema propertiesheaderandfooteroptional string properties toDocsConfigurationschemaheaderandfooterfields toParsedDocsConfigurationinterfaceconvertHeaderFooterConfigfunction inparseDocsConfiguration.tsto resolve file paths and read JS file contentsDocsDefinitionResolver.convertDocsConfigurationto include header/footer in the docs shape sent to FDRheaderandfooternoop handlers in docs-validator AST visitorUpdates Since Last Revision
header/footerproperty definitions inDocsDefinitionResolver.tsthat occurred during merge (removed deprecatedundefinedplaceholders in favor of actual implementation)Testing
pnpm run check)pnpm run fern:build)Human Review Checklist
DocsConfiguration.tswon't be overwritten by schema regeneration (file is inschemas/sdk/api/which suggests it may be auto-generated)readFilewill throw)