This is an AMP version of the article, its original content can be found here.

Custom Pygments Lexer in Jekyll

I needed to create a custom syntax highlighting for on which I'm using Jekyll for site rendering.

This is how my code blocks look in markdown pages:

I created a custom Pygments lexer:

Then, I packaged it for easy_install and installed locally:

It's done. Now I run jekyll build and my syntax is highlighted according to the custom rules I specified in the lexer.