I'm having trouble adding Liquid syntax inside of includes that have span-level elements within my Jekyll project.
I have an include called note.html that looks like this:
<div markdown="span" class="alert alert-info" role="alert"><i class="fa fa-info-circle"></i> <b>Note:</b> {{include.content}}</div>
On a page, I use the include like this:
{% include note.html content="This is a sample note." %}
It works fine.
However, if I try to put Liquid syntax inside the content parameter, I get an error. Here's an example:
{% include note.html content="This is a sample note and {{site.description}}" %}
The error on the command line shows this:
Liquid Exception: Invalid syntax for include tag. File contains invalid characters or sequences: note.html content="This is a sample note and Intended as a documentation theme based on Jekyll for technical writers documenting software and other technical products, this theme has all the elements you would need to handle multiple products with both multi-level sidebar navigation, tags, and other documentation features." Valid syntax: {% include file.ext param='value' param2='value' %} in index.md
...error:
However, if I avoid using the include but instead just insert the include's content directly, it works. Here's an example:
<div markdown="span" class="alert alert-info" role="alert"><i class="fa fa-info-circle"></i> <b>Note:</b> This is a sample note and {{site.description}}</div>
No error results.
Why is this Liquid syntax resulting in the error when I use includes?
Tom