McPride.Markdig.AsciiDoc
0.4.0
See the version list below for details.
dotnet add package McPride.Markdig.AsciiDoc --version 0.4.0
NuGet\Install-Package McPride.Markdig.AsciiDoc -Version 0.4.0
<PackageReference Include="McPride.Markdig.AsciiDoc" Version="0.4.0" />
paket add McPride.Markdig.AsciiDoc --version 0.4.0
#r "nuget: McPride.Markdig.AsciiDoc, 0.4.0"
// Install McPride.Markdig.AsciiDoc as a Cake Addin #addin nuget:?package=McPride.Markdig.AsciiDoc&version=0.4.0 // Install McPride.Markdig.AsciiDoc as a Cake Tool #tool nuget:?package=McPride.Markdig.AsciiDoc&version=0.4.0
The AsciiDoc renderer
With this renderer you can convert a CommonMark compliant markdown document to an equivalent AsciiDoc document. The reason, why I wrote it, is, that my team mainly writes technical documentation in AsciiDoc format and converts it to multiple target formats like html, docbook, docx or pdf. Unfortunately there exist some pieces of documentation written in markdown e.g. architecture decision records, which are driven by markdown focused tools. With the help of the AsciiDoc renderer we can now include our ADRs into our arc42 based architecture documentation, written in AsciiDoc.
Dependencies
- dotnet >= v6.0
- Markdig nuget package
Status
The renderer is marked with a 0 as major version which means, this is in an early stage not ready for production! Use it at your own risk! Breaking changes are possible without increasing the major version. Updates and bugfixes will simply increase the minor version.
With update to version 1.0.0 and higher the versioning then will follow the semver pattern.
Installation
You can add McPride.Markdig.AsciiDoc
as nuget package to your project.
- dotnet cli:
dotnet add package McPride.Markdig.AsciiDoc
- PS Package Manager:
Install-Package McPride.Markdig.AsciiDoc
- nuget cli:
nuget install McPride.Markdig.AsciiDoc
Alternativly you can also download the source code, include the McPride.Markdig.AsciiDoc
project into your solution and reference it in your project.
Usage
See also the example project gfm-to-adoc
!
var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
var document = MarkdownParser.Parse(File.ReadAllText("my-markdown-file.md"), pipeline);
var renderer = new AsciiDocRenderer(new StringWriter());
renderer.Render(document);
renderer.Writer.Flush();
File.WriteAllText("my-asciidoc-file.adoc", renderer.Writer.ToString());
Examples
- gfm-to-adoc: Minimalistic example that converts the
src/examples/gfm-to-adoc/github-flavored-markdown.md
example markdown file to thesrc/examples/gfm-to-adoc/github-flavored-markdown.adoc
AsciiDoc output file.
License
The source code of this repository is under BSD 2-Clause license. See the LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net6.0
- Markdig (>= 0.31.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.