I'm making a Jekyll site where I have different categories of posts. On the homepage, i want to display every post except those with the category advertisement
. However, this code doesn't filter advertisements. Is there a way to do it in Jekyll's api?
{% for post in site.posts %}
{% if post.category != advertisement %}
<li>
<figure>
<img src="{{ site.url }}/img/large/{{ post.photo }}" alt="img"/>
<figcaption><h3>{{ post.caption_header}}</h3><p>{{ post.caption }}</p></figcaption>
</figure>
</li>
{% endif %}
{% endfor %}
advertisement
? – matt