if... !true conditional rendering in nunjucks
I see you've got a bit of a bobby dazzler here.
Try using not
instead of !
.
In other words, use not
, not !
!
Give 'er a go mate and notice that in the raw section here they highlight not
as if it's a keyword.
https://mozilla.github.io/nunjucks/templating.html#raw
Best of luck to ye.
You can use the syntax:
<% '' if posts.length else 'No project posts yet!' %>
https://mozilla.github.io/nunjucks/templating.html#if-expression