Module MarkDownToHTML v2.8.0
🔖 Synopsis
A collection of PowerShell commands to convert Markdown files to static HTML sites in various ways.
Components packaged with this module:
Component Version Description Markdig 0.37.0 Fast Markdown processor for .NET highlight.js 11.9.0 Code syntax highlighter KaTeX 0.16.10 Math typesetting Mermaid 10.9.0 Diagramming Svgbob 0.7.2 Text based diagramming Code Syntax Highlighting (highlight.js)
Pre-configured code syntax highlighting languages in this package:
Language Fenced Code Block Aliases AsciiDoc asciidoc, adoc Apache apache, apacheconf autoit autoit Bash bash, sh C# csharp, cs, c# C c, h C++ cc, c++, h++, hpp, hh, hxx, cxx Clojure clojure, clj, edn Clojure REPL clojure-repl CMake cmake, cmake.in CSS css Diff diff, patch DOS .bat dos, bat, cmd Erlang Erlang REPL erlang-repl Excel excel, xlsx, xls F# fsharp, fs. f# Fortran fortran, f90, f95 Go go, golang Graphql graphql, gql Groovy groovy HTTP http, https INI, TOML ini, toml Java java, jsp JavaScript javascript, js, jsx, mjs, cjs JSON json Julia julia, jldoctest Julia REPL julia-repl Kotlin kotlin, kt, kts LaTeX latex, tex less less Lisp lisp Lua lua Makefile makefile, mk, mak, make Markdown markdown, md, mkdown, mkd Mathematica mathematica, mma, wl Maxima maxima nginx nginx, nginxconf Node REPL node-repl Perl perl, pl, pm PHP php Plain Text plaintext, txt, text PowerShell powershell, pwsh, ps, ps1 Prolog prolog Properties properties Python python, py, gyp, ipython Python REPL python-repl, pycon R r Rust rust, rs Scala scala Scheme scheme, scm scss scss shell shell, console, shellsession smalltalk smalltalk, st SQL sql tcl tcl, tk Typescript typescript, ts, tsx, mts, cts Visual Basic.net vbnet, vb vbscript vbscript, vbs vbscript-html vbscript-html vim vim x86asm x86asm XML/HTML xml, html, xhtml, rss, atom, xjb, xsd, xsl, plist, wsf, svg Xquery xquery, xpath, xq, xqm YAML yml, yaml See also Customization for more information.
Markdown Extensions
Projects generated by
New-StaticHTMLSiteProject
have following Markdown extensions pre-configured:
common
definitionlists
mathematics
diagrams
pipetables
autoidentifiers
Exported Functions
- Convert-MarkdownToHTML
- Convert-MarkdownToHTMLFragment
- Convert-SvgbobToSvg
- ConvertTo-NavigationItem
- Expand-DirectoryNavigation
- Expand-HtmlTemplate
- Find-MarkdownFiles
- New-HTMLTemplate
- New-PageHeadingNavigation
- New-SiteNavigation
- New-StaticHTMLSiteProject
- Publish-StaticHtmlSite
- Test-LocalSiteLinks
- Update-ResourceLinks
Release Notes
Release notes for this and previous releases are on GitHub at: MarkdownToHtml Releases.
Upgrading Custom Templates and Static Site Projects.
Unless there is a known incompatibility (see below) or you want to take advantage of new capabilities, no action is needed.
Refer to Upgrading Custom Conversion Templates for custom template upgrade instructions and to Upgrading Static Site Projects for static site upgrades.
Known Incompatibilities
2.7.0
The fix for issue #35 introduces an issue with
site_navigation
configurations inBuild.json
build configuration files which are below the directory tree specified in themardown_dir
option of the top-level build configuration file (Build.json
). The fix now handles relative links correctly. If you have gotten navigation links to work by using links which are not relative to theBuild.json
file they are defined in, the no longer work.To locate these links you can use the
Test-LocalSiteLinks
function.
2.0.0
If you have have 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.*). The version of Markdig included in this release introduces an incompatiblity with projects which use the mathematics extension.
To address this incompaibility the KaTex configuration in all deployed html templates (
md_template.html
) need to be updated like so:<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>
Module: MarkDownToHTML; Version: 2.8.0; (c) 2018-2024 WetHat Lab. All rights reserved.