rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[api-documenter] Adding ExperimentalMarkdownDocumenter to make use of custom categories.

Open paperbackdragon opened this issue 4 years ago • 0 comments

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 Screen Shot 2019-11-22 at 2 29 20 PM

paperbackdragon avatar Nov 22 '19 19:11 paperbackdragon