3

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.

1

2 Answers 2

1

You can use Rouge or Coderay for this purpose.

Sign up to request clarification or add additional context in comments.

1 Comment

Your answer was the starting point, then it took a long way to actually make it work! :) I realized that kramdown applies coderay by default I only needed to build it locally and push the buid to github pages or my own host.
1

You could use something like this:

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.