-1
When I compare in if if the post.category
it’s like there’s no post variable that’s in for more when I put {{post.category}}
it prints the name. It’s like in if
he wouldn’t exist anymore if I put site.post.category
no if takes all values.
The problem is that I want to take the current post to compare if it’s that category. I want to list posts by category.
<div class="posts">
{% for post in site.posts %}
{% if post.category == Eventos %}
<hr />
<div class="post">
<h1 class="post-title">
<a href="{{ site.url }}{{post.url}}">
{{ post.title }}
</a>
</h1>
<span class="post-date">{{ post.date | date_to_string }} / {{ post.category }}</span>
{{ post.excerpt }}
<h6><a href="{{ site.url }}{{post.url}}">Leia mais...</a></h6>
</div>
{% endif %}
{% endfor %}
</div>
How simple, thank you very much @luciorubeens
– Rafael Tavares
If the answer was accepted as correct, mark as "best answer", please.
– Fuad Saud