How can I check if there are no posts in the _posts folder?
So far, I've tried
{% if site.posts == null %}
<p>No posts...yet.</p>
{% endif %}
and
{% if site.posts == nil %}
<p>No posts...yet.</p>
{% endif %}
Is this possible in Liquid?
How can I check if there are no posts in the _posts folder?
So far, I've tried
{% if site.posts == null %}
<p>No posts...yet.</p>
{% endif %}
and
{% if site.posts == nil %}
<p>No posts...yet.</p>
{% endif %}
Is this possible in Liquid?
Here is a simpler approach.
{% if site.posts.size == 0 %}
<p>No posts...yet.</p>
{% endif %}