I had a problem controlling the appearance of tags on my site when using a for loop to display everything tagsin site.tags.
This is what I intend:
<li class="sliced-almonds">sliced almonds</li>
And this is what I have:
{% for tag in site.tags %}
<li class="{{ tag | handleize | replace:' ','-' }}">{{ tag }}</li>
{% endfor %}
But instead, I get the following:
<li class="[" sliced-almonds",-[<post:-="" salads="" salad-04="">]]">sliced almonds</li>
source
share