Releases: WetHat/MarkdownToHtml
Maintenance Release
Bugfix Release
- Issue #44 - Fix deprecated API call to highlight.js
- Issue #45 - Updated module manifest to load System.Web asssembly
☝️ See the release notes section of the module manifest for additional information about compatibility and upgrade instructions.
Feature Release
New Features and Enhancements ✨
- Component updates
Issue Component Version Description #37 Markdig 0.28.1 Fast Markdown processor for .NET #38 highlight.js 11.5.1 Code syntax highlighter #40 KaTeX 0.15.3 Math typesetting #39 Mermaid 9.0.0 Diagramming #41 Svgbob 0.6.6 Text based diagramming - Issue #34 - 1-Level directory expansion implemented for navigation links. Exported function Expand-DirectoryNavigation
- Issue #36 - Added function Test-LocalSiteLinks to check for broken links to local Markdown files and images.
- Improved Documentation
Bugfixes
- Issue #35 - Fixed relative navigation links in
Build.json
files located in the markdown sources directory tree. This bugfix may cause an incompatibility with projects which, in addition to the project-levelBuild.json
configuration, have additionalBuild.json
file in the mardown sources directory tree. See [Known Incompatibilities (https://wethat.github.io/MarkdownToHtml/2.7/MarkdownToHTML.html#known-incompatibilities). - Issue #42 - Visual Studio C++ runtime v 14.0 packages with the module to make svgbob diagrams work where the runtime is
is not installed. Affected function Convert-SvgbobToSvg. - Other minor fixes
☝️ See the release notes section of the module manifest for additional information about compatibility and upgrade instructions.
Bugfix Release
- Fixed:
Build.json
files directly undermarkdown_dir
did not work. Build.json
no longer coped tosite_dir
- Misc. cosmetic fixes
Feature Release
-
Cascading build configuration.
Build.json
configuration files can be added
at any level in the Markdown subtree to provide directory specific configuration.
Can be used to superseed site configurations or build a directory specific
navigation bars. -
External components updated:
Feature Release
Markdig update to version 0.25.0
-
Support for publishing static websites to
GitHub Pages.This new feature is backwards compatible with existing static site projects.
However, if you want to use this new feature in existing site projects
following changes must be applied:-
Build.json
project configuration file
Thesite_dir
option needs to be changed and a new optiongithub_pages
must be added as shown below:{ ... "site_dir": "docs", ... "github_pages": false, ... }
Using the name
docs
for the site directory makes it possible to check-in
the entire conversion project as-is. As soon as GitHub Pages are
enabled and configured to publish the static site from thedocs
directory, the site is accessible on the web through its canonical
GitHub Pages url. -
Build.ps1
project build file
Add a statement to disable the GitHub publishing process (jekyll) which
is not necessary for static sites created by this module. Add
following code to the end of the build file:... if ($config.github_pages) { # Switch off Jekyll publishing when building for GitHub pages New-Item -Path $staticSite -Name .nojekyll -ItemType File }
-
-
Added a Html fragment post-processing step to the conversion pipeline.
The default post-processing function
Convert-SvgbobToSvg
converts Svgbob
ASCII art diagrams to svg images. See the
feature showcase
for an example.This new feature is backwards compatible with existing static site projects.
However, if you want to useSvgbob
diagrams in existing site projects
following changes must be made:-
Build.json
project configuration file
A new optionsvgbob
option needs to be added to for configuration
of the svg conversion.{ ... "svgbob": { "background": "white", "fill_color": "black", "font_size": 14, "font_family": "Monospace", "scale": 1, "stroke_width": 2 } }
See Static Site Project Customization
for more details. -
Build.json
project configuration file
A postprocessing stage needs to be inserted into to the conversion pipeline by
adding a-Split
switch toConvert-MarkdownToHTMLFragment
and then piping
its output toConvert-SvgbobToSvg
like so:# Conversion pipeline $SCRIPT:markdown = Join-Path $projectDir $config.markdown_dir Find-MarkdownFiles $markdown -Exclude $config.Exclude ` | Convert-MarkdownToHTMLFragment -IncludeExtension $config.markdown_extensions -Split ` | Convert-SvgbobToSvg -SiteDirectory $staticSite -Options $SCRIPT:config.svgbob ` | Publish-StaticHTMLSite -Template (Join-Path $projectDir $config.HTML_Template) ` -ContentMap $contentMap ` -MediaDirectory $markdown ` -SiteDirectory $staticSite
-
Maintenance Release
-
Navigation bar improvements (Static HTML site projects):
- scrollbar added to long navbars.
md-styles.css
overhauled for static site template to make navbar usable
for overflowing navitems- HTML fragments with resource links supported in navitem names.
Example from aBuild.json
which displays a navigatable image:"site_navigation": [ { "<img width='90%' src='site_logo.png'/>": "README.md" }, { "Home": "README.md" }, { "---": "" } ]
- New commands implemented to remove code duplication and make the
Build.ps1
file more consistent.
Upgrade of theBuild.ps1
file of existing projects is optional. All changes
are backeard compatible. If you want to upgrade anyways change the content
map section ofBuild.ps1
file like so:$SCRIPT:contentMap = @{ # Add additional mappings here... '{{footer}}' = $config.Footer # Footer text from configuration '{{nav}}' = { param($fragment) # the html fragment created from a markdown file $navcfg = $config.navigation_bar # navigation bar configuration # Create the navigation items configured in 'Build.json' New-SiteNavigation -NavitemSpecs $config.site_navigation ` -RelativePath $fragment.RelativePath ` -NavTemplate $navcfg.templates # Create navigation items to headings on the local page. # This requires the `autoidentifiers` extension to be enabled. New-PageHeadingNavigation -HTMLfragment $fragment.HTMLFragment ` -NavTemplate $navcfg.templates ` -HeadingLevels $navcfg.capture_page_headings } }
-
Module Documentation
- Code and conceptial documentation improved
- Documentation generated with this module and published to
GitHub Pages
Maintenance Release
- default navigation menu changed to a static vertical sidebar.
- navigation items pop out dynamically on mouse hover.
- auto-added navigation items for page headings indented according to heading
level. - navbar formatting made more consistent.
- navbar small screen support
Feature Release
-
Page navigation bar made customizable. To take advantage of this feature
in existing projects following files need to be updated:-
Build.ps1
: A-NavTemplate
parameter needs to be added to the invokation ofConvertTo-NavigationItem
.
A-NavTemplate
and a-HeadingLevels
parameter needs to be added to
the invokation ofConvertTo-PageHeadingNavigation
.
For example:# Set-up the content mapping rules for replacing the templace placeholders $SCRIPT:contentMap = @{ # Add additional mappings here... '{{footer}}' = $config.Footer # Footer text from configuration '{{nav}}' = { param($fragment) # the html fragment created from a markdown file $navcfg = $config.navigation_bar # navigation bar configuration # Create the navigation items configured in 'Build.json' $config.site_navigation | ConvertTo-NavigationItem -RelativePath $fragment.RelativePath ` -NavTemplate $navcfg.templates # Create navigation items to headings on the local page. # This requires the `autoidentifiers` extension to be enabled. ConvertTo-PageHeadingNavigation $fragment.HTMLFragment -NavTemplate $navcfg.templates ` -HeadingLevels $navcfg.capture_page_headings } }
-
Build.json
: a navigation bar configuration section needs to be added:... "navigation_bar": { "capture_page_headings": "123456", "templates": { "navitem": "<button class='navitem'><a href='{{navurl}}'>{{navtext}}</a></button>", "navlabel": "<div class='navitem'>{{navtext}}</div>", "navseparator": "<hr class='navitem'/>", "navheading": "<span class='navitem{{level}}'>{{navtext}}</span>" } }, ...
-
-
Markdig
update to version 0.24 -
KateX
update to version 0.13.11 -
Mermaid
update to version 8.10.1
Bugfix Release
Referenced .net assemblies added which may not always be present