-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(api-markdown-documenter): Allow deeper customization of outp…
…ut folder structure (#23366) Previously, users could control certain aspects of the output documentation suite's file-system hierarchy via the `documentBoundaries` and `hierarchyBoundaries` properties of the transformation configuration. One particular limitation of this setup was that items yielding folder-wise hierarchy (`hierarchyBoundaries`) could never place their own document _inside_ of their own hierarchy. This naturally lent itself to a pattern where output would commonly be formatted as: ``` - foo.md - foo - bar.md - baz.md ``` This pattern works fine for many site generation systems - a link to `/foo` will end up pointing `foo.md` and a link to `/foo/bar` will end up pointing to `foo/bar.md`. But some systems (e.g. `Docusaurus`) don't handle this well, and instead prefer setups like the following: ``` - foo - index.md - bar.md - baz.md ``` With the previous configuration options, this pattern was not possible, but now is. Additionally, this pattern is _more_ commonly accepted, so lack of support for this was a real detriment. Such patterns can now be produced via the consolidated `hierarchy` property, while still allowing full file-naming flexibility. ### Notes for reviewers I would recommend starting with `Hierarchy.ts` - it contains the new configuration options related to hierarchy. The rest of the PR is predominantly respecting that new configuration setup. To keep things relatively simple, system defaults and test configurations have been intentionally made to preserve existing system default behaviors. As a result, you'll notice that none of the end-to-end tests have updated collateral. However, the intention _is_ to update default behaviors, and to add more end-to-end test configurations. For now, I have left a handful of TODOs in configuration defaults and test configurations - I will address those in a follow-up PR.
- Loading branch information
Showing
28 changed files
with
1,528 additions
and
971 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.