I'm building a website with Eleventy for the first time, and even though I have worked with Liquid for a while now, I just can't crack this one.
I want to simplify the architecture as much as possible. This is why I have assigned my collections to variables:
{% assign blogposts = collections.posts %}
so later on in the site I can just write a really short and sweet:
{% for post in blogposts %}...{% endfor %}
instead of assigning the collections just above it in a file.
Now here's my problem:
I would love to filter away posts marked as draft (using draft: true in the frontmatter). I thought I'd be able to do it like one of these (I've tried...)
{% assign blogposts = collections.posts | draft: false %}
{% assign blogposts = collections.posts | where: draft, false %}
{% assign blogposts = collections.posts | where: data.draft, false %}
{% assign blogposts = collections.posts_nl | where: "draft", "false" %}
Does anyone know how I can accomplish this? Unfortunately it feels to me like the version of liquid used in Eleventy is an older one, and the documentation I can find never seems to address how I can do this. I would really appreciate some help! :)