Open yevgeni-zolotko opened 3 years ago
You could write a custom post-processor to modify the generated HTML documents. See https://dotnet.github.io/docfx/tutorial/howto_add_a_customized_post_processor.html
Inside the processors Process
method you could then iterate over all generated HTML files and reorder the <li>
elements in the navigation.
public Manifest Process(Manifest manifest, string outputFolder)
{
var htmlFilePaths = manifest.Files
.Where(f => f.OutputFiles.ContainsKey(".html"))
.Select(f => f.OutputFiles[".html"])
.Select(f => Path.Combine(outputFolder, f.RelativePath));
// TODO Patch table of contents in each HTML file
return manifest;
}
Hello,
Is it possible to change namespaces order in API reference docs generated by docfx from a single assembly from alphabetical sort to custom?
For example, I want my generated HTML navigation tree to go from
to
I.e. I want to specifically configure the
MyNamespaceC
to be at the top of the list.