Hexo

Writing Hexo filters

Hexo, the static blogging system that I use is very extensible and provides numerous hooks into generation pipeline.

While working on a Russian language blog that’s coming online soon, I had the opportunity to write a filter to render Cyrillic text in a different font than the rest of the body text.

Markup filter use case

I wanted to set the Cyrillic text apart both in color, typeface, and font weight. Although I could have extended Hexo using a new tag, I decided to use a filter so that after rendering HTML anywhere on the blog, items demarcated by double pipes || would be replaced by a new <span>.

Automate hexo blogging tasks with Grunt

In my never-ending journey to find the optimal blogging platform, I wandered into the hexo camp. Among its many attributes is speed. Compared to Octopress, site generation is very fast. However, deployment has been tricky. Since I host my blogs from an Amazon S3 bucket, I tried to use the aws deployer commonly used with hexo; but I could never get it to install properly on OS X 10.11. So I wrote my own deployer that essentially just runs an AppleScript that handles the synchronization task. It is very slow. So I’m always on the lookout for faster deployment schemes. It looks like a Grunt-based system is the ticket.