Generates documentation for a .NET library in Markdown intended for Docusaurus using docfx.
dotnet tool install -g DocFxMarkdownGen
# now installed as "dfmg", use with "dotnet dfmg" or just "dfmg" if tools are in PATHBy default dfmg takes it's config from config.yaml, you can override the file using the DFMG_CONFIG environment
variable.
outputPath: /home/jan/whatever/docs/api
yamlPath: /home/jan/gen/apioutputPathis the path where the generated documentation will be placed, it is always wiped. Can be overriden with theDFMG_OUTPUT_PATHenvironment variable.yamlPathis the path where the.ymlfiles generated bydocfx metadataare placed, probably theapidirectory where yourdocfx.jsonfile is. Can be overriden with theDFMG_YAML_PATHenvironment variable.indexSlugis the slug of the index page, defaults to/api.typesGroupingread below.rewriteInterlinksset this totrueif encountering issues with links when building the site.
Example:
# ...
typesGrouping:
enabled: true
minCount: 1 # default is 12If type grouping is enabled, types in namespaces with a number of types greater than or equal to minCount will be
grouped by Class, Struct, Interface, Enum and Delegate in the sidebar.
Example:
# ...
#brNewline: " \n" # default is "\n\n"
#forceNewline: true # default is false
#forcedNewline: " \n" # default is " \n"brNewlineis the string that will be used to replace<br/>tags in the generated markdown.forceNewlineif true, will replace all newlines(\n) withforcedNewline.
- RCaron
- (outdated)
examples/discord-net-dfmg: example site done on Discord.Net - (outdated) Log73
For creating your own site, head to:
- dfmg-template for a minimalish example
- dfmg-template2 for a more complete example with versioned docs and CI examples for deploying to GitHub Pages and Vercel from GitHub Actions
This project is not finished, if you find an issue or something missing in the markdown generated, please open an issue or even open a PR!