MarkdownToHtml
2.0.0
Markdown to HTML conversion is based on [Markdig](https://github.com/lunet-io/markdig),
a fast, powerful, [CommonMark](http://commonmark.org/) compliant,
extensible Markdown processor for .NET.
### Incompatibilities
This version is incompatible with existing conversion projects
w
Markdown to HTML conversion is based on [Markdig](https://github.com/lunet-io/markdig),
a fast, powerful, [CommonMark](http://commonmark.org/) compliant,
extensible Markdown processor for .NET.
### Incompatibilities
This version is incompatible with existing conversion projects
which use the _mathematics_ extensions and were created with versions of this module
older than 2.0.0 (i.e. 1.* or 0.*).
**Make sure to read the release notes for 2.0.0 below for instructions on how to upgrade your
existing conversion projects.**
# Quickstart
The typical use case is to convert a bunch of Markdown files in a directory
to a static Html site using [`Convert-MarkdownToHtml`](Convert-MarkdownToHTML.md).
If the Html default conversion template is not sufficient a custom template
can be generated with [`New-HtmlTemplate`](New-HTMLTemplate.md).
If the converter pipeline need to be modified to meet the needs of
a special process, the converter pipeline can be custom built using:
* [`Find-MarkdownFiles`](Find-MarkdownFiles.md)
* [`Convert-MarkdownToHtmlFragment`](Convert-MarkdownToHTMLFragment.md)
* [`Publish-StaticHtmlSite`](Publish-StaticHtmlSite.md)
# Preinstalled Markdown Extensions
Following additional extensions are installed with this module:
* **Code syntax highlighting** based on the [highlight.js](https://highlightjs.org/)
JavaScript library which supports 185 languages and 89 styles as well as
automatic language detection. Code syntax highlighting is activated by default
and configured for following languages:
* Bash
* C#
* C++
* Clojure
* CMake
* CSS
* Diff
* DOS .bat
* F#
* Groovy
* HTML/XML
* HTTP
* Java
* JavaScript
* JSON
* Lisp
* Makefile
* Markdown
* Maxima
* Perl
* Python
* PowerShell
* SQL
* YAML
To obtain syntax highlighting for other/additional languages, please visit
the [Getting highlight.js](https://highlightjs.org/download/) page and
get a customized version of highlight.js configured for the languages
you need.
* **Diagramming** based on the [mermaid](https://mermaidjs.github.io/) diagram
and flowchart generator. Diagramming is pre-installed and activated.
* **LaTeX Math typesetting** based on the [KaTeX](https://katex.org/) LaTeX Math
typesetting library. Math typesetting is pre-installed and activated
# Other Open Source Markdown to HTML Converters
* [MkDocs](https://www.mkdocs.org/) - A fast and simple static site generator
that is geared towards building project documentation.
Documentation source files are written in Markdown, and configured with a
single YAML configuration file.
Installation Options
Owners
Copyright
(c) 2018-2020 WetHat Lab. All rights reserved.
Package Details
Author(s)
- WetHat
Tags
Functions
Publish-StaticHtmlSite Find-MarkdownFiles Convert-MarkdownToHTMLFragment Convert-MarkdownToHTML New-HTMLTemplate
Dependencies
This module has no dependencies.
Release Notes
## 2.0.0
#### Known Incompatibilities
The updated version of _Markdig_ incuded in this release introduces
an incompatiblity in the _mathematics_ extension which breaks _KaTeX_ math rendering.
To address this incompaibility the KaTex configuration in **all** deployed html templates
(`md_template.html`) needs to be updated like so:
~~~ html
<script>
// <![CDATA[
window.onload = function() {
var tex = document.getElementsByClassName("math");
Array.prototype.forEach.call(tex, function(el) {
katex.render(el.textContent, el, {
displayMode: (el.nodeName == "DIV"),
macros: {
"\\(": "",
"\\)": "",
"\\[": "",
"\\]": ""
}
})
});
};
// ]]>
</script>
~~~
#### New Features
* Highlighting languages _Perl_ and _YAML_ added
#### Maintenance
* Updated to _Markdig_ 0.18.0.
* KaTeX updated to version 0.11.1
* Code syntax highlighting updated to version 9.17.1
#### Bugfixes
* Rendering of math blocks now creates centered output with the correct (bigger) font.
* Changed the default html template (`md_template.html`) to address the incompatible
change in the LaTeX math output of the _mathematics_ extension of _Markdig_.
## 1.3.0
* upgrade of markdig to version 0.17.2
* KaTex upgraded to 0.11.0
* Re-factored the Markdown converter pipeline and made it parts public
to make it useful for a broader range of Markdown conversion scenarios.
## 1.2.8
* `Write-Host` replaced by the more benign `Write-Verbose`
* Minor code cleanup
## 1.2.7
* Empty lines allowed im 'md-template.html` to remove an ugly but harmless
exception.
* Syntax highlighting updated to version 9.14.2
* Upgrade to markdig version 0.15.7
* Added Resources and configuration for the [mermaid](https://mermaidjs.github.io/) diagram and
flowchart generator version 8.0.0 to the HTML template.
* Added Resources and configuration for the [KaTeX](https://katex.org/) LaTeX Math
typesetting library version 0.10.0 to the HTML template.
* Documentation improved.
## 1.2.6
* Powershell Gallery metadata added.
## 1.2.4
* Replaced `[System.Web.HttpUtility]` by `[System.Net.WebUtility]` to fix issue
when powershell is run with `-noprofile`
## 1.2.3
* Fixed regression introduced in 1.2.2
* Regression test setup
## 1.2.2
* Support for markdown files in a directory hierarchy fixed.
(directory scanning fixed and relative path added to resource links)
## 1.2.1
Handle partially HTML encoded code blocks
## 1.2.0
* Replaced XML template processing with text based template processing,
to relax constraints on the HTML fragment quality.
* HTML encode text in `<code>` blocks
## 1.1.0
* Setting of Markdown parser options implemented
* Wildcard support for pathes added
## 1.0.0
Initial Release
FileList
- MarkdownToHtml.nuspec
- LICENSE
- Markdig.dll
- Markdown2HTML.png
- MarkdownToHtml.psd1
- MarkdownToHtml.psm1
- MarkdownToHtml.pssproj
- MarkdownToHtml.tests.ps1
- README.md
- Documentation\Convert-MarkdownToHTML.md
- Documentation\Convert-MarkdownToHTMLFragment.md
- Documentation\Find-MarkdownFiles.md
- Documentation\MarkdownToHTML.md
- Documentation\New-HTMLTemplate.md
- Documentation\Publish-StaticHtmlSite.md
- obj\Debug\MarkdownToHtml.pssproj.FileListAbsolute.txt
- obj\Debug\MarkdownToHtml.pssprojAssemblyReference.cache
- ReferenceData\Code.html
- ReferenceData\KaMaid.html
- ReferenceData\KaTex.html
- ReferenceData\mermaid.html
- ReferenceData\html\.gitignore
- ReferenceData\html\Code.html
- ReferenceData\html\KaMaid.html
- ReferenceData\html\KaTex.html
- ReferenceData\html\mermaid.html
- ReferenceData\html\js\highlight.pack.js
- ReferenceData\html\js\mermaid.min.js
- ReferenceData\html\katex\katex.css
- ReferenceData\html\katex\katex.js
- ReferenceData\html\katex\katex.min.css
- ReferenceData\html\katex\katex.min.js
- ReferenceData\html\katex\katex.mjs
- ReferenceData\html\katex\README.md
- ReferenceData\html\katex\contrib\auto-render.js
- ReferenceData\html\katex\contrib\auto-render.min.js
- ReferenceData\html\katex\contrib\auto-render.mjs
- ReferenceData\html\katex\contrib\copy-tex.css
- ReferenceData\html\katex\contrib\copy-tex.js
- ReferenceData\html\katex\contrib\copy-tex.min.css
- ReferenceData\html\katex\contrib\copy-tex.min.js
- ReferenceData\html\katex\contrib\copy-tex.mjs
- ReferenceData\html\katex\contrib\mathtex-script-type.js
- ReferenceData\html\katex\contrib\mathtex-script-type.min.js
- ReferenceData\html\katex\contrib\mathtex-script-type.mjs
- ReferenceData\html\katex\contrib\mhchem.js
- ReferenceData\html\katex\contrib\mhchem.min.js
- ReferenceData\html\katex\contrib\mhchem.mjs
- ReferenceData\html\katex\contrib\render-a11y-string.js
- ReferenceData\html\katex\contrib\render-a11y-string.min.js
- ReferenceData\html\katex\contrib\render-a11y-string.mjs
- ReferenceData\html\katex\fonts\KaTeX_AMS-Regular.ttf
- ReferenceData\html\katex\fonts\KaTeX_AMS-Regular.woff
- ReferenceData\html\katex\fonts\KaTeX_AMS-Regular.woff2
- ReferenceData\html\katex\fonts\KaTeX_Caligraphic-Bold.ttf
- ReferenceData\html\katex\fonts\KaTeX_Caligraphic-Bold.woff
- ReferenceData\html\katex\fonts\KaTeX_Caligraphic-Bold.woff2
- ReferenceData\html\katex\fonts\KaTeX_Caligraphic-Regular.ttf
- ReferenceData\html\katex\fonts\KaTeX_Caligraphic-Regular.woff
- ReferenceData\html\katex\fonts\KaTeX_Caligraphic-Regular.woff2
- ReferenceData\html\katex\fonts\KaTeX_Fraktur-Bold.ttf
- ReferenceData\html\katex\fonts\KaTeX_Fraktur-Bold.woff
- ReferenceData\html\katex\fonts\KaTeX_Fraktur-Bold.woff2
- ReferenceData\html\katex\fonts\KaTeX_Fraktur-Regular.ttf
- ReferenceData\html\katex\fonts\KaTeX_Fraktur-Regular.woff
- ReferenceData\html\katex\fonts\KaTeX_Fraktur-Regular.woff2
- ReferenceData\html\katex\fonts\KaTeX_Main-Bold.ttf
- ReferenceData\html\katex\fonts\KaTeX_Main-Bold.woff
- ReferenceData\html\katex\fonts\KaTeX_Main-Bold.woff2
- ReferenceData\html\katex\fonts\KaTeX_Main-BoldItalic.ttf
- ReferenceData\html\katex\fonts\KaTeX_Main-BoldItalic.woff
- ReferenceData\html\katex\fonts\KaTeX_Main-BoldItalic.woff2
- ReferenceData\html\katex\fonts\KaTeX_Main-Italic.ttf
- ReferenceData\html\katex\fonts\KaTeX_Main-Italic.woff
- ReferenceData\html\katex\fonts\KaTeX_Main-Italic.woff2
- ReferenceData\html\katex\fonts\KaTeX_Main-Regular.ttf
- ReferenceData\html\katex\fonts\KaTeX_Main-Regular.woff
- ReferenceData\html\katex\fonts\KaTeX_Main-Regular.woff2
- ReferenceData\html\katex\fonts\KaTeX_Math-BoldItalic.ttf
- ReferenceData\html\katex\fonts\KaTeX_Math-BoldItalic.woff
- ReferenceData\html\katex\fonts\KaTeX_Math-BoldItalic.woff2
- ReferenceData\html\katex\fonts\KaTeX_Math-Italic.ttf
- ReferenceData\html\katex\fonts\KaTeX_Math-Italic.woff
- ReferenceData\html\katex\fonts\KaTeX_Math-Italic.woff2
- ReferenceData\html\katex\fonts\KaTeX_SansSerif-Bold.ttf
- ReferenceData\html\katex\fonts\KaTeX_SansSerif-Bold.woff
- ReferenceData\html\katex\fonts\KaTeX_SansSerif-Bold.woff2
- ReferenceData\html\katex\fonts\KaTeX_SansSerif-Italic.ttf
- ReferenceData\html\katex\fonts\KaTeX_SansSerif-Italic.woff
- ReferenceData\html\katex\fonts\KaTeX_SansSerif-Italic.woff2
- ReferenceData\html\katex\fonts\KaTeX_SansSerif-Regular.ttf
- ReferenceData\html\katex\fonts\KaTeX_SansSerif-Regular.woff
- ReferenceData\html\katex\fonts\KaTeX_SansSerif-Regular.woff2
- ReferenceData\html\katex\fonts\KaTeX_Script-Regular.ttf
- ReferenceData\html\katex\fonts\KaTeX_Script-Regular.woff
- ReferenceData\html\katex\fonts\KaTeX_Script-Regular.woff2
- ReferenceData\html\katex\fonts\KaTeX_Size1-Regular.ttf
- ReferenceData\html\katex\fonts\KaTeX_Size1-Regular.woff
- ReferenceData\html\katex\fonts\KaTeX_Size1-Regular.woff2
- ReferenceData\html\katex\fonts\KaTeX_Size2-Regular.ttf
- ReferenceData\html\katex\fonts\KaTeX_Size2-Regular.woff
- ReferenceData\html\katex\fonts\KaTeX_Size2-Regular.woff2
- ReferenceData\html\katex\fonts\KaTeX_Size3-Regular.ttf
- ReferenceData\html\katex\fonts\KaTeX_Size3-Regular.woff
- ReferenceData\html\katex\fonts\KaTeX_Size3-Regular.woff2
- ReferenceData\html\katex\fonts\KaTeX_Size4-Regular.ttf
- ReferenceData\html\katex\fonts\KaTeX_Size4-Regular.woff
- ReferenceData\html\katex\fonts\KaTeX_Size4-Regular.woff2
- ReferenceData\html\katex\fonts\KaTeX_Typewriter-Regular.ttf
- ReferenceData\html\katex\fonts\KaTeX_Typewriter-Regular.woff
- ReferenceData\html\katex\fonts\KaTeX_Typewriter-Regular.woff2
- ReferenceData\html\styles\agate.css
- ReferenceData\html\styles\far.css
- ReferenceData\html\styles\md-styles.css
- ReferenceData\html\styles\tomorrow-night-blue.css
- ReferenceData\html\styles\vs.css
- ReferenceData\html\styles\vs2015.css
- ReferenceData\html\SubDir\SubDirSingle.html
- ReferenceData\html\SubDir2\SubDir2\SubDirSingle.html
- Template\md-template.html
- Template\js\highlight.pack.js
- Template\js\mermaid.min.js
- Template\katex\katex.css
- Template\katex\katex.js
- Template\katex\katex.min.css
- Template\katex\katex.min.js
- Template\katex\katex.mjs
- Template\katex\README.md
- Template\katex\contrib\auto-render.js
- Template\katex\contrib\auto-render.min.js
- Template\katex\contrib\auto-render.mjs
- Template\katex\contrib\copy-tex.css
- Template\katex\contrib\copy-tex.js
- Template\katex\contrib\copy-tex.min.css
- Template\katex\contrib\copy-tex.min.js
- Template\katex\contrib\copy-tex.mjs
- Template\katex\contrib\mathtex-script-type.js
- Template\katex\contrib\mathtex-script-type.min.js
- Template\katex\contrib\mathtex-script-type.mjs
- Template\katex\contrib\mhchem.js
- Template\katex\contrib\mhchem.min.js
- Template\katex\contrib\mhchem.mjs
- Template\katex\contrib\render-a11y-string.js
- Template\katex\contrib\render-a11y-string.min.js
- Template\katex\contrib\render-a11y-string.mjs
- Template\katex\fonts\KaTeX_AMS-Regular.ttf
- Template\katex\fonts\KaTeX_AMS-Regular.woff
- Template\katex\fonts\KaTeX_AMS-Regular.woff2
- Template\katex\fonts\KaTeX_Caligraphic-Bold.ttf
- Template\katex\fonts\KaTeX_Caligraphic-Bold.woff
- Template\katex\fonts\KaTeX_Caligraphic-Bold.woff2
- Template\katex\fonts\KaTeX_Caligraphic-Regular.ttf
- Template\katex\fonts\KaTeX_Caligraphic-Regular.woff
- Template\katex\fonts\KaTeX_Caligraphic-Regular.woff2
- Template\katex\fonts\KaTeX_Fraktur-Bold.ttf
- Template\katex\fonts\KaTeX_Fraktur-Bold.woff
- Template\katex\fonts\KaTeX_Fraktur-Bold.woff2
- Template\katex\fonts\KaTeX_Fraktur-Regular.ttf
- Template\katex\fonts\KaTeX_Fraktur-Regular.woff
- Template\katex\fonts\KaTeX_Fraktur-Regular.woff2
- Template\katex\fonts\KaTeX_Main-Bold.ttf
- Template\katex\fonts\KaTeX_Main-Bold.woff
- Template\katex\fonts\KaTeX_Main-Bold.woff2
- Template\katex\fonts\KaTeX_Main-BoldItalic.ttf
- Template\katex\fonts\KaTeX_Main-BoldItalic.woff
- Template\katex\fonts\KaTeX_Main-BoldItalic.woff2
- Template\katex\fonts\KaTeX_Main-Italic.ttf
- Template\katex\fonts\KaTeX_Main-Italic.woff
- Template\katex\fonts\KaTeX_Main-Italic.woff2
- Template\katex\fonts\KaTeX_Main-Regular.ttf
- Template\katex\fonts\KaTeX_Main-Regular.woff
- Template\katex\fonts\KaTeX_Main-Regular.woff2
- Template\katex\fonts\KaTeX_Math-BoldItalic.ttf
- Template\katex\fonts\KaTeX_Math-BoldItalic.woff
- Template\katex\fonts\KaTeX_Math-BoldItalic.woff2
- Template\katex\fonts\KaTeX_Math-Italic.ttf
- Template\katex\fonts\KaTeX_Math-Italic.woff
- Template\katex\fonts\KaTeX_Math-Italic.woff2
- Template\katex\fonts\KaTeX_SansSerif-Bold.ttf
- Template\katex\fonts\KaTeX_SansSerif-Bold.woff
- Template\katex\fonts\KaTeX_SansSerif-Bold.woff2
- Template\katex\fonts\KaTeX_SansSerif-Italic.ttf
- Template\katex\fonts\KaTeX_SansSerif-Italic.woff
- Template\katex\fonts\KaTeX_SansSerif-Italic.woff2
- Template\katex\fonts\KaTeX_SansSerif-Regular.ttf
- Template\katex\fonts\KaTeX_SansSerif-Regular.woff
- Template\katex\fonts\KaTeX_SansSerif-Regular.woff2
- Template\katex\fonts\KaTeX_Script-Regular.ttf
- Template\katex\fonts\KaTeX_Script-Regular.woff
- Template\katex\fonts\KaTeX_Script-Regular.woff2
- Template\katex\fonts\KaTeX_Size1-Regular.ttf
- Template\katex\fonts\KaTeX_Size1-Regular.woff
- Template\katex\fonts\KaTeX_Size1-Regular.woff2
- Template\katex\fonts\KaTeX_Size2-Regular.ttf
- Template\katex\fonts\KaTeX_Size2-Regular.woff
- Template\katex\fonts\KaTeX_Size2-Regular.woff2
- Template\katex\fonts\KaTeX_Size3-Regular.ttf
- Template\katex\fonts\KaTeX_Size3-Regular.woff
- Template\katex\fonts\KaTeX_Size3-Regular.woff2
- Template\katex\fonts\KaTeX_Size4-Regular.ttf
- Template\katex\fonts\KaTeX_Size4-Regular.woff
- Template\katex\fonts\KaTeX_Size4-Regular.woff2
- Template\katex\fonts\KaTeX_Typewriter-Regular.ttf
- Template\katex\fonts\KaTeX_Typewriter-Regular.woff
- Template\katex\fonts\KaTeX_Typewriter-Regular.woff2
- Template\styles\agate.css
- Template\styles\far.css
- Template\styles\md-styles.css
- Template\styles\tomorrow-night-blue.css
- Template\styles\vs.css
- Template\styles\vs2015.css
- TestData\markdown\Code.md
- TestData\markdown\KaMaid.md
- TestData\markdown\KaTex.md
- TestData\markdown\mermaid.md
- TestData\markdown\Dir\SubDir\SubDirSingle.md
- TestData\markdown\Dir2\SubDir2\SubDir2\SubDirSingle.md
Version History
Version | Downloads | Last updated |
---|---|---|
2.8.0 | 8,212 | 4/15/2024 |
2.7.1 | 5,681 | 4/24/2022 |
2.7.0 | 25 | 4/23/2022 |
2.6.1 | 733 | 1/19/2022 |
2.6.0 | 31 | 1/17/2022 |
2.5.0 | 3,571 | 7/26/2021 |
2.4.0 | 373 | 5/28/2021 |
2.3.1 | 108 | 5/20/2021 |
2.3.0 | 39 | 5/19/2021 |
2.2.2 | 2,087 | 10/12/2020 |
2.2.1 | 28 | 10/12/2020 |
2.2.0 | 1,259 | 5/2/2020 |
2.1.1 | 34 | 4/30/2020 |
2.1.0 | 35 | 4/30/2020 |
2.0.0 (current version) | 1,451 | 1/12/2020 |
1.3.0 | 464 | 9/19/2019 |
1.2.8 | 728 | 4/9/2019 |
1.2.7 | 845 | 2/2/2019 |
1.2.6 | 1,921 | 2/27/2018 |