The not entirely reliable trick I’ve found for inserting liquid code into an Octopress codeblock is to double wrap your code with [% codeblock %] [% raw %] ... [% endraw ] [% endcodeblock %]. But use curly brackets { } instead of square brackets [ ]. I can’t use the curly brackets because if I do they bugger up the codeblock below.
Here is sample output when I double wrap with codeblock and raw.
1 2 3 4 5 6 7 8 9 | |
The alternative is to farm your code snippets out to a separate file.
Let me know if you’ve found a better way of doing this.