0

We are using gh-pages for internal documentation. We have example code blocks and they render just fine in the GitHub page but when converting to gh-pages the yaml syntax seems to filter out variables. So we have for example:

    variables:
      name_filter: "name-2022*"
      prefix: "{{ resource_prefix }}"

As said this looks completely fine in the rendered code page but when rendered into a gh-page the prefix entry is just empty quotes like:

    variables:
      name_filter: "name-2022*"
      prefix: ""

Obviously for our documentation this is no good. I have tried changing the markdown to kramdown to see if that made a difference and it doesn't help.

It has been mentioned to use the {% raw %} {% endraw %} macros around code blocks but this means that when viewing the github page (not the rendered gh-page), you end up with those macro blocks being visible which is just as confusing as having empty code blocks.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
TripodNH
  • 124
  • 11
  • How are you building your GitHub Pages? Are you using Jekyll or similar? Many templating languages use `{{ }}` for their own variables. – ChrisGPT was on strike Feb 25 '22 at 16:32
  • yes we are using Jekyll – TripodNH Feb 25 '22 at 16:51
  • After trying the {% raw %} block it was showing that syntax in the github markdown page. In the page that this was pointed to the only solution that worked for me is using HTML comments like: `` `` Around the entire codeblock – TripodNH Feb 25 '22 at 18:44

0 Answers0