Skip to content

Command line tool to convert Markdown formatted files to HTML.

License

Notifications You must be signed in to change notification settings

algonzalez/md-to-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

md2html - Markdown to HTML

dot NET 5 package license supported platforms platforms pending testing

md2html is a command-line interface (CLI) tool for converting markdown formatted files into HTML. It wraps the Markdig markdown processing library with a command-line driven UI.

I like to write my markdown documents in the Visual Studio Code editor with the help of the Markdown All in One and the Markdown Preview Mermaid Support extensions. These extensions are great, but they are still missing a few useful additions to markdown. This is what Markdig adds to the mix. Markdig provides quite a few useful additions to markdown, like ^ for superscript, ~ for subscript, grid tables, definition lists, ordered lists with alpha characters or roman numerals and even emojis.

How to Build

  1. Clone the repository by calling git clone https://github.com/algonzalez/md-to-html.git.
  2. From the cloned project's directory call build (or build prompt for an interactive mode).
  3. The resulting application will be in the dist/any/ directory.

You can also call build --help to display the available targets.

Dependencies

See the LICENSE.txt file for copyright and license information for each dependency.

Usage

  • md2html --help shows help with available options.
  • md2html HowTo.md converts the file and writes the HTML to stdout.
  • md2html --to-file HowTo.md results in a HowTo.html file in the same directory as the HowTo.md file. It will fail if the HowTo.html file already exists. Adding the --overwrite option will attempt to replace the file with the new HTML.
  • md2html --to-file HowTo.md CHANGELOG.md will convert the two specified files. You can also use wildcards md2html --to-file *.md or mix and match md2html --to-file HowTo.md docs\*.md.
  • md2html --to-file --outdir htmlfiles HowTo.md results in a HowTo.html file in the htmlfiles directory.
  • md2html --to-file HowTo.md --style custom.css will merge the contents of the custom.css into the html file.
  • md2html --to-file HowTo.md --style https://cdnjs.cloudflare.com/ajax/libs/tufte-css/1.7.2/tufte.min.css will include a stylesheet link tag pointing to the specified URL.

Authors

Alberto Gonzalez (aka "Al")

Copyright & License

md2html is Copyright 2021 by Alberto Gonzalez, All Rights Reserved.

It is licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License.

You may obtain a copy of the License in the LICENSE.txt file, or at https://opensource.org/licenses/Apache-2.0

About

Command line tool to convert Markdown formatted files to HTML.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages