Closed theory closed 2 years ago
When I run your input through the kramdown binary using kramdown -x parser-gfm -i GFM
I get the following output:
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">agent-inject-template-my_secret.json</span><span class="pi">:</span> <span class="pi">|</span>
<span class="err">{</span><span class="s">{ with secret "dev/testsecret" }}{{ .Data.data | toJSON }}{{ end }}</span>
</code></pre></div></div>
which seems right.
So my guess is this has something to do with Jekyll itself because the {{...}}
parts look like Liquid tags, so please ask there.
Oh Liquid tags, of course, I forget that Jekyll executes them in content files. Apologies for the noise, appreciate the pointer.
For anyone running into this in the future, the solution is, sadly, to add raw
/endear
liquid tags to tell Jekyll to ignore your liquid tags:
``` yaml
agent-inject-template-my_secret.json: |
{% raw %}{{ with secret "dev/testsecret" }}{{ .Data.data | toJSON }}{{ end }}{ %endraw %}
```
I have this something like this in a Jekyll post:
The second line does not display. The entirety of the resulting HTML is:
I have tried removing removing the pipe, changing it to
!-
, unindenting the second line, none of which work. I can get the line to appear if I put a backslash before each{
, but then those backslashes render in the HTML, too.Rendered by GitHub Pages' Jekyll support.