I have a question in Jekyll Liquid.
I have layout, where I want to show pages from category. To show category I use page.categories variable. When I show in bracket {{page.categories}} is correct. but I don't know, how to pass to loop?
{% for post in site.categories[page.categories] %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
{% for post in site.categories[{{page.categories}}] %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
Don't work.
If I passed explicite:
{% for post in site.categories['cat1'] %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
It works.
I found another topic:
Jekyll site.categories.{{variable}}?
But it doesn't work.