Tool to generate markdown from C# XML documentation.
See sample generated documentation here.
dotnet tool install -g XMLDoc2Markdown
xmldoc2md <DLL_SOURCE_PATH> <OUTPUT_DIRECTORY>
xmldoc2md Sample.dll docs
You can insert custom code example into the documentation.
Create one file for each examples. Give them the full name of corresponding type, property, method,...
Add the CLI option: --examples-path
with the path to examples files.
## Example
Lorem ipsum...
```csharp
new MyClass();
```
#### Example
Lorem ipsum...
```csharp
foo.MyProperty = "foo";
```
#### Example
Lorem ipsum...
```csharp
foo.MyMethod("foo");
```
#### Example
Lorem ipsum...
```csharp
new MyClass();
```
xmldoc2md -h
Usage: xmldoc2md [options] <src> <out>
Arguments:
src DLL source path
out Output directory
Options:
-v|--version Show version information.
-?|-h|--help Show help information.
--index-page-name Name of the index page, (default: "index").
--examples-path Path to the code examples to insert in the documentation.
--github-pages Remove '.md' extension from links for GitHub Pages.
--gitlab-wiki Remove '.md' extension and './' prefix from links for gitlab wikis.
--back-button Add a back button on each page with custom text, (default: "< Back").
--link-back-button Set link for back button, (default: "./").
--private-members Write documentation for private members.
--onlyinternal-members Write documentation for only internal members.
--excludeinternal Exclude documentation for internal types.
--templatefile Layout template for documentation, (default: "template.md").
--back-index-button Add a back button in index page, (default: "< Back").
--link-backindex-button Set link for back button in index page, (default: "./").
{xmldoc2md-Title()} = Title of Document
{xmldoc2md-Back()} = back-button for pages
{xmldoc2md-BackIndex()} = back-button for index page
{xmldoc2md-Body()} = The Documentation
# <img align="left" width="100" height="100" src="MyImage.png">Custom Title :{xmldoc2md-Title()}
{xmldoc2md-Back()}{xmldoc2md-BackIndex()}
- - -
{xmldoc2md-Body()}
- - -
{xmldoc2md-Back()}