How to highlight Markdown code in Jekyll?

491 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 answers

1
Zombo On BEST ANSWER

You can use Rouge or Coderay for this purpose.

0
Gunith D On

You could use something like this:

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