I need to change this liquid syntax into nunjucks:
{% assign posts = collections.post | getPostsByContributor: contributor.key %}
Is this correct for nunjucks?
{% set posts = collections.post | getPostsByContributor: contributor.key %}
Eleventy gives me error "expected block end in set statement".
The syntax for passing arguments to Nunjucks filters is a bit different. Try this:
{% set posts = collections.post | getPostsByContributor(contributor.key) %}
More info: