Fragment in my redirects.liquid: {% for post in collections.redirected -%} {%- for path in post.data.oldPermalinks -%} rewrite ^/{{ path }} {{ post.page.url }} permanent; {%- endfor %} {% endfor %} Collection in my eleventy.config.js: eleventyConfig.addCollection("redirected", function (collectionsApi) { return collectionsApi .getAll() .filter(function (item) { return "oldPermalinks" in item.data; }) .sort(function (a, b) { const dateDiff = a.date - b.date; return dateDiff !== 0 ? dateDiff : a.inputPath.localeCompare(b.inputPath); }); });