LoxSmoke.mddox

Simple Markdown documentation generator


Keywords
documentation, docxml, loxsmoke, markdown, mddox, xml
License
MIT
Install
Install-Package LoxSmoke.mddox -Version 0.12.0

Documentation

NuGet version NuGet

mddox

Global tool that creates markdown documentation using reflection and XML comments extracted from the source code by the compiler.

Sample documentation generated by the tool Command line command used to generate the docxml.dll assembly documentation:

mddox DocXml.dll -s latest

Sample documentation generated by the tool in zh-CN locale Command line command used to generate the docxml.dll assembly documentation:

mddox DocXml.dll -s latest --language zh-cn

MSDN page on XML documentation comments

Installation

dotnet tool install -g loxsmoke.mddox

Uninstallation

dotnet tool uninstall -g loxsmoke.mddox

Usage

mddox
Usage: mddox <assembly> [optional-parameters]

<assembly>   - The name of the assembly to document.

Optional parameters:

Short format Long format Comment
-o output_md --output output_md The name of the markdown output file.
-f format --format format The markdown file format. Valid values: github,bitbucket,azure.
--all-recursive Step into all referenced assemblies recursively.
-r assembly --recursive assembly Step into specified referenced assemblies recursively.
Specify one or more assembly names separated by spaces.
--include stuff The list of space-separated filters of things to include in documentation.
Filter by access: subject.visibility
Subject is one of: [all, type, method, field, property]
Visibility is one of: [all, public, protected, private]
Example: all.public

Filter by attribute: subject.attribute.attribute_name
Subject is one of: [all, type, method, field, property]
attribute_name is the name of the attribute.
Example: field.attribute.JsonIgnoreAttribute

Filter by name: subject.name.wildcard
Subject is one of: [all, type, method, field, property]
wildcard is a simple wildcard matching the name.
Example: type.name.Hidden*
--exclude stuff The list of space-separated filters of things to exclude from documentation.
Syntax is the same as for include filters
-m --ignore-methods Deprecated. Replaced with --exclude method.all. Do not generate documentation for methods and constructors.
Useful for POCO documentation.
-d --method-details Generate detailed documentation for methods and constructors.
Setting has no effect if --ignore-methods is specified.
-a name --ignore-attribute name Deprecated. Replaced with --exclude all.attribute.name. Do not generate documentation for properties with specified custom attribute(s).
For example JsonIgnoreAttribute
More than one space-separate attribute can be specified.
-t name --type name Document only the specified type and all types referenced by it.
-s view --msdn view Generate links to the MSDN documentation for System.* and Microsoft.* types.
The documentation pages are located at this site https://docs.microsoft.com
View specifies what version of the type to show. Use latest, netcore-3.1, or net-5.0
-i "title" --title "title" Document title. Use {assembly} and {version} in the format string to insert the name of the assembly and assembly version.
-n --no-title Do not write the "created by mddox at date" in the markdown file.
-v --verbose Print some debug info when generating documentation. It may help troubleshooting some issues such as missing type information of referenced assemblies.
-l --language "language-code" Generate output using specified language. Available languages: en-us, zh-cn

For best results enable XML documentation build switch in your project and use publish build to get all referenced assemblies in one folder.

Documenting all types of one assembly

mddox MyAssembly.dll

Documenting only fields and properties of all types in assembly

mddox MyAssembly.dll --exclude method.all

Documenting types that do not have specified custom attributes

mddox MyAssembly.dll --exclude all.attribute.JsonIgnoreAttribute --exclude all.attribute.XmlIgnore

Document one type and all referenced types from different assemblies

mddox MyAssembly.dll --type ClassToDocument --recursive ReferencedAssembly1.dll --recursive ReferencedAssembly2.dll

Solutions

There are two solutions in this repository. The mddox.sln solution includes DocXml nuget package. The mddox-dev.sln is development solution that includes full source of DocXml as git sub-module. Sub-module can be updated to the latest version by running git pull origin master in the DocXml folder.