https://github.com/ap0llo/mddocs
A tool to generate documentation as Markdown files
https://github.com/ap0llo/mddocs
api csharp documentation dotnet markdown
Last synced: 5 months ago
JSON representation
A tool to generate documentation as Markdown files
- Host: GitHub
- URL: https://github.com/ap0llo/mddocs
- Owner: ap0llo
- License: mit
- Created: 2018-11-04T16:15:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-05-13T17:24:38.000Z (about 1 year ago)
- Last Synced: 2025-09-15T13:36:09.596Z (9 months ago)
- Topics: api, csharp, documentation, dotnet, markdown
- Language: C#
- Homepage:
- Size: 1.85 MB
- Stars: 28
- Watchers: 5
- Forks: 4
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MdDocs
## Overview
[](https://dev.azure.com/ap0llo/OSS/_build/latest?definitionId=11&branchName=master)
[](https://renovatebot.com/)
[](https://conventionalcommits.org)
| Package | NuGet.org | MyGet |
|---------------------------|--------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Grynwald.MdDocs` | [](https://www.nuget.org/packages/Grynwald.MdDocs) | [](https://www.myget.org/feed/ap0llo-mddocs/package/nuget/Grynwald.MdDocs) |
| `Grynwald.MdDocs.MSBuild` | [](https://www.nuget.org/packages/Grynwald.MdDocs.MSBuild) | [](https://www.myget.org/feed/ap0llo-mddocs/package/nuget/Grynwald.MdDocs.MSBuild) |
*MdDocs* is a tool to generate documentation in the form of Markdown documents.
It currently supports:
- Generating API reference from a .NET assembly and the corresponding XML documentation file
- Generating command line help for projects that use the [CommandLineParser package](https://www.nuget.org/packages/CommandLineParser/) for parsing
For an example of what the output looks like, have a look at the [demoprojects](docs/demoprojects) directory.
## Documentation
For documentation on installation and usage, please refer to the
corresponding sub-pages:
- [MdDocs .NET CLI Tool](./docs/net-cli-tool.md)
- [MdDocs MSBuild Integration](./docs/msbuild-integration.md)
- [Configuration](./docs/configuration/README.md)
## Building from source
ℹ This repository uses git submodules. Use `git clone --recursive` to check out submodules as well.
Building MdDocs from source requires the .NET 7 SDK (at lease version 7.0.101 as specified in [global.json](./global.json)) and uses [Cake](https://cakebuild.net/) for the build.
To run tests, the .NET 6 SDK and a installation of Visual Studio 2022 is requried as well.
(this only applies to the `MdDocs.MSBuild.IntegrationTest` project, all other test project should be executable with only the .NET 7 SDK).
To execute the default task, run
```ps1
.\build.ps1
```
This will build the project, run all tests and pack the NuGet package.
## Issues
If you run into any issues or if you are missing a feature, feel free to open an [issue](https://github.com/ap0llo/mddocs/issues).
I'm also using issues as a backlog of things that come into my mind or things I plan to implement, so don't be surprised if many issues were created by me without anyone else being involved in the discussion.
## Acknowledgments
*MdDocs* was made possible through a number of libraries (aside from
.NET Core and .NET Standard). Thanks to all the people contribution to these projects:
- Parts of this program are based on code from the [NuDoq project](https://github.com/kzu/NuDoq/),
licensed under the Apache License 2.0.
See [`XmlDocsReader.cs`](src/MdDoc/Model/XmlDocs/XmlDocsReader.cs) for details
- [Mono.Cecil](https://github.com/jbevain/cecil/)
- [CommandLineParser](https://github.com/gsscoder/commandline)
- [Nerdbank.GitVersioning](https://github.com/AArnott/Nerdbank.GitVersioning/)
- [Microsoft.Extensions.Logging](https://github.com/aspnet/Extensions)
- [Microsoft.Extensions.Configuration](https://github.com/aspnet/Extensions)
- [Microsoft.DotNet.Analyzers.Compatibility](https://github.com/dotnet/platform-compat)
- [xUnit](http://xunit.github.io/)
- [Xunit.Combinatorial](https://github.com/AArnott/Xunit.Combinatorial)
- [Moq](https://github.com/moq/moq4)
- [ApprovalTests](https://github.com/approvals/ApprovalTests.Net)
- [Microsoft.CodeAnalysis.CSharp](https://github.com/dotnet/roslyn)
- [Coverlet](https://github.com/tonerdo/coverlet)
- [SourceLink](https://github.com/dotnet/sourcelink)
- [NuGet](https://github.com/NuGet/NuGet.Client)
- [Newtonsoft.Json](https://www.newtonsoft.com/json)
- [Cake](https://cakebuild.net/)
- [Cake.BuildSystems.Module](https://github.com/cake-contrib/Cake.BuildSystems.Module)
- [Verify](https://github.com/VerifyTests/Verify)
- [nugetizer](https://www.clarius.org/nugetizer/)
- [MSBuildStructuredLog](https://github.com/KirillOsenkov/MSBuildStructuredLog)
## Versioning and Branching
The version of the library is automatically derived from git and the information in `version.json` using [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning):
- The master branch always contains the latest version. Packages produced from master are always marked as pre-release versions (using the `-pre` suffix).
- Stable versions are built from release branches. Build from release branches will have no `-pre` suffix
- Builds from any other branch will have both the `-pre` prerelease tag and the git commit hash included in the version string
To create a new release branch use the [`nbgv` tool](https://www.nuget.org/packages/nbgv/):
```ps1
dotnet tool install --global nbgv
nbgv prepare-release
```