saricden
saricden

Reputation: 2342

How to use markdown code highlighting for Liquid in JekyllRB?

Using JekyllRB/Rouge, how does one highlight (but not interpret) Liquid code within a markdown file?

IE:

I have a markdown file with:

Blah blah blah, my cool post... here's some code:

```liquid
{% assign variableName = 'test' %}
```

In the resulting HTML, I'd like to see the actual code, without Jekyll interpreting it within the markdown file.

Upvotes: 0

Views: 411

Answers (1)

saricden
saricden

Reputation: 2342

I figured it out.

Make use of the {% raw %} Liquid tag.

IE:

```
{% raw %}
  {{ somevariablewewanttoshow }}
{% endraw %}
```

Upvotes: 1

Related Questions