rushstack
rushstack copied to clipboard
[api-documenter] Adding ExperimentalMarkdownDocumenter to make use of custom categories.
I wanted to make use of the experimental tableOfContents
part of the api-documenter.json
config file in markdown, since it's only used in the yaml output today. I created an ExperimentalMarkdownDocumenter
that lists categories as top-level headers in markdown, and then has classes, interfaces, etc listed underneath each of those categories.
Currently this only makes use of the categoryInlineTag
option within the tableOfContents
config. If the categoryInlineTag
option is left empty, the markdown will generate as if there were no categories included.
NOTE: Most of the relevant code here is in the first commit, for ease of reviewing.
In a separate commit (because it changed so many files), I moved api-documenter-test
into two separate inner repos, so that yaml and markdown can be tested separately, and the regular output can be tested alongside the "expiermental" output.
Example of the difference if you now use the generate
command, using api-documenter-test-markdown
code:
![Screen Shot 2019-11-22 at 2 29 07 PM](https://user-images.githubusercontent.com/899430/69455008-78d6eb00-0d35-11ea-9cb0-b51ce0bf518e.png)
![Screen Shot 2019-11-22 at 2 29 20 PM](https://user-images.githubusercontent.com/899430/69455012-7a081800-0d35-11ea-9910-41b6a538b64e.png)