Walt Stoneburner's Ramblings

Currating Chaos

Hexo Markdown

 •  • solved, 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.

Yarn Issues

 •  • solved, software

While exploring hexo, I ran into a problem installing it.

yarn was aborting the install claiming that there was no <code>--production</code> switch.

A quick check of yarn's version number showed that I was somehow way out of date.

According to yarn's installation directions this was merely a matter of performing a self-update, which yarn also claimed it wasn't able to do, or to install an updated pubkey.gpg and install/update with apt.

These solutions didn't work either.

The problem was that another package, cmdtest, had it's own obsolete copy of yarn.

The solution was simply to uninstall it, then install yarn with apt:

sudo apt remove cmdtest

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn