Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I generate documentation for C# that outputs as Markdown for an Azure DevOps Wiki?

I've been using DocFX to generate code documentation for C# and for the most part found a lot of success with it. The articles are flexible and I really like that I can use markdown to maintain them while having them live side by side with the API references. I have also already spent the time documenting walkthroughs in Markdown and building a CI pipeline.

The problem I am trying to solve is that I need to figure out a way to get my code documentation (xml comments) output to be markdown instead of html so that it can be hosted by markdown wiki solution, specifically Azure DevOps (aka TFS). Azure DevOps Wiki seems to be very similar to gh-pages from GitHub as well, so I'm interested in similar solutions that I might be able to get to work in Azure DevOps. DocFX doesn't solve this problem because the output is .html instead of markdown.

All of Microsoft's documentation is focused on writing documentation by hand. I'm interested in generating documentation based on the xml comments in the code.

like image 811
War Gravy Avatar asked Feb 04 '20 19:02

War Gravy


People also ask

What is doxygen in C?

Doxygen (/ˈdɒksidʒən/ DOK-see-jən) is a documentation generator and static analysis tool for software source trees. When used as a documentation generator, Doxygen extracts information from specially-formatted comments within the code.

How do I create a doxygen comment?

Once specified, you can generate the comment stub by typing the respective “///” or “/**” above a function, or by using the (Ctrl+/) shortcut. To get started, you can have Visual Studio generate an . editorconfig file for you based on your existing setting for documentation by using the “Generate .


1 Answers

It looks like its a long open request on DocFx.

This alternative solution was recommended in a couple of places that I saw XmlDocMarkdown.

A console app that generates Markdown from .NET XML documentation comments.

Or you could always go with Pandoc. Either using the stock conversion, or roll your own custom LUA filter for the conversion process.

like image 168
Eric Smith Avatar answered Nov 14 '22 05:11

Eric Smith