Skip to content

A utility library to programatically generate markdown files

License

Notifications You must be signed in to change notification settings

ap0llo/markdown-generator

Repository files navigation

Markdown Generator

Overview

Build Status Conventional Commits Renovate

MyGet NuGet

Markdown Generator is a library for generating Markdown documents programatically. It implements the CommonMark specification as well as the table extension specified by GitHub Flavored Markdown.

  • For an overview of the library's API, see API
  • For usage examples see Examples

Installation

MarkdownGenerator is distributed as NuGet package.

  • Prerelease builds are available on MyGet
  • Release versions are available on NuGet.org

Building from source

MarkdownGenerator is a .NET Standard library. Building it from source requires the .NET 6 SDK (version 6.0.101 as specified in global.json) and uses Cake for the build.

To execute the default task, run

.\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.

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

Markdown Generator was made possible through a number of libraries (aside from .NET Core and .NET Standard):

The implementation of ASCII-art tree used to visualize the structure of a document is basd on AsciiTreeDiagram by Andrew Lock, licensed under the MIT license.
See Creating an ASCII-art tree in C# for details.

Addititional dependencies (used for testing), in no specific order:

Versioning and Branching

The version of the library is automatically derived from git and the information in version.json using 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 (at least version 3.0.24):

dotnet tool install --global nbgv 
nbgv prepare-release