Walt Stoneburner's Ramblings

Currating Chaos

Hexo Markdown

I recently started playing with Hexo and nearly gave up completely due to the markdown system provided with it.

I found strange behaviors, such as multiple adjacent lines were being treated a linebreaks instead of a paragraph, as markdown normally does.

There was a workaround, which involved changing a setting in the _config.yaml file, but that didn't fix things completely.

If a line started with a link, then there were situtations where it wouldn't wrap it in a paragraph and weird things happened. If a link came at the end of the line, it'd usually work fine, but if there was a period immediately after the tag, then it'd absorb the next paragraph.

I found with all kinds of permutations just trying to build a simple example.

Then, I read about hexo-renderer-markdown-it which was described as "Markdown down right."

I uninstalled the default version:

npm un hexo-renderer-marked --save

Installed the new one:

npm i hexo-renderer-markdown-it --save

And without changing any of my valid markdown, the page rendered perfectly.

This plugin should be the default version that ships with hexo.