Hello! I have a Jekyll site and I’m trying to generate a list of courses based on a yaml file. I have incorporated if statements so I can print entries for some courses but not others, depending on whether a certain attribute exists in the yaml entry.
The yaml file is here and the page is here. You can see the Jekyll code for the page here.
Somehow, enclosing an element inside an if
block, like so:
{% if entry.syllabus %}
[Syllabus](/assets/pdf/{{entry.syllabus}})
{% endif %}
makes Jekyll format the result as a code snippet rather than implementing the link. The same text, if placed outside the if
block, works as intended and produces a link.
What am I doing wrong?