If there is a way in DocFx to configure this properly, I haven't found it yet.
But the following approach works and we can create all tocs automatically
1) Extend convertPlatyPStoDocFxMarkdown.ps1 to also create the reference/toc.yml for the cmdlets.
2) Run docfx metadata to generate the api/*.yml and api/toc.yml for the types.
3) Join both tocs into a single file at reference/toc.yml
4) Run docfx build to generate the website.
The api/toc.yml must be either explicitly excluded in docfx.json or just deleted in Step 3.
Also make sure to update the Inputs/Outputs for the docs build targets to include the *.cs files the metadata step depends upon. We've forgotten this in the current iteration.
Not sure yet if the two docfx runs should also be split into separate build targets.
reference/toc.yml
link toapi/toc.yml
inserts unwanted extra toc level. If linking to api index page, we get two separate tocs.If there is a way in DocFx to configure this properly, I haven't found it yet. But the following approach works and we can create all tocs automatically
1) Extend
convertPlatyPStoDocFxMarkdown.ps1
to also create thereference/toc.yml
for the cmdlets. 2) Rundocfx metadata
to generate theapi/*.yml
andapi/toc.yml
for the types. 3) Join both tocs into a single file atreference/toc.yml
4) Rundocfx build
to generate the website. Theapi/toc.yml
must be either explicitly excluded indocfx.json
or just deleted in Step 3.Also make sure to update the
Inputs/Outputs
for the docs build targets to include the*.cs
files themetadata
step depends upon. We've forgotten this in the current iteration.Not sure yet if the two docfx runs should also be split into separate build targets.