How to highlight Markdown code in Jekyll?

508 Views Asked by At

I want to highlight markdown code in jekyll but I can't find a way how to do it. I looked at Pygement's lexers but I did not found one for markdown or kramdown.

I can highlight other codes but not markdown and kramdawn.

2

There are 2 best solutions below

1
On BEST ANSWER

You can use Rouge or Coderay for this purpose.

0
On

You could use something like this:

```markdown
{% raw %}{% if page.tags %}...{% endif %}{% endraw %}
```