McPride.Markdig.AsciiDoc 0.5.0

dotnet add package McPride.Markdig.AsciiDoc --version 0.5.0                
NuGet\Install-Package McPride.Markdig.AsciiDoc -Version 0.5.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="McPride.Markdig.AsciiDoc" Version="0.5.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add McPride.Markdig.AsciiDoc --version 0.5.0                
#r "nuget: McPride.Markdig.AsciiDoc, 0.5.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install McPride.Markdig.AsciiDoc as a Cake Addin
#addin nuget:?package=McPride.Markdig.AsciiDoc&version=0.5.0

// Install McPride.Markdig.AsciiDoc as a Cake Tool
#tool nuget:?package=McPride.Markdig.AsciiDoc&version=0.5.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

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 the src/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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.5.0 2,171 5/3/2023
0.4.0 157 5/2/2023
0.3.0 180 4/28/2023