hertzole.docfx2astro
1.4.0
dotnet tool install --global hertzole.docfx2astro --version 1.4.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local hertzole.docfx2astro --version 1.4.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=hertzole.docfx2astro&version=1.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package hertzole.docfx2astro --version 1.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Because DocFX's built-in markdown is not very good
If it wasn't clear from the title, this tool converts docfx metadata to Astro Starlight markdown.
The generated markdown aims to be as close to the official Microsoft documentation as possible.
This project is a mess currently (and may forever be) but it works for the most part.
Usage
Use docfx to generate metadata.
docfx metadata
Then use docfx2astro to convert the metadata to markdown.
docfx2astro -i <path to docfx metadata> -o <path to output markdown>
This will generate a global index file, a folder for each assembly with an index landing page, and a page for each type. By default, they will generate with a /reference/ slug/base path. You can change this with the base-slug parameter.
| Parameter | Description |
|---|---|
-i --input |
The location of all the API files, usually where docfx put the metadata files. (Required) |
-o --output |
The location to put all the generated markdown files. (Required) |
--base-slug |
Used in types slugs. By default, it will be reference, so your types will be /reference/namespace.type.<br>Setting base-slug to something like api will result in a slug /api/namespace.type. Can also be left empty. |
--group-by |
Controls how documentation is organized. By default, documentation is grouped by Assembly.<br>Setting this to Namespace will group types by their namespace instead. Valid values are:<br>- Assembly (default) - Groups types by their containing assembly<br>- Namespace - Groups types by their namespace |
--dont-clear |
When set, the output directory will not be cleared before writing. By default, this is false. |
--verbose |
When set, the tool will output more information about what it is doing. By default, this is false. |
Installation
Install from NuGet.
dotnet tool install -g hertzole.docfx2astro
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.