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.
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>
.