I have a series of posts in a Jekyll project where some of them have only a title and some have a title and content. I want to do different things from the post in each case. For instance:
{% for post in site.categories.publications %} {{ post.title }} {% if post.content == "" or post.content == nil or post.content == blank %} <p>Nothing here.</p> {% else %} {{ post.content }} {% endif %} {% endfor %}
But the if
does not actually catch empty messages. I based my terms on this page , but none of the three possibilities caught empty messages. Any ideas on how to handle these posts?
source share