2

i want to downcase Liquid-object in Jekyll:

<a href="/tags/{{ page.tags }}/">{{ page.tags | downcase }}</a>

{{ page.tags | downcase }} doesn't work. Do you have an idea?

Thanks!

1 Answer 1

1

If you want to print a list of downcased page's tags, you can do :

{% comment %}Create an empty array{% endcomment %}
{% assign tagArray = "" | split: "/" %}

{% for tag in page.tags %}
    {% assign tagDowncased = tag | downcase %}
    {% assign tagArray = tagArray | push: tagDowncased %}
{% endfor %}

<p>{{ tagArray | joint: ", " }}</p>
1
  • Perfect! Thanks a lot! Dec 14, 2015 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.