---js { pagination: { data: "collections.all", size: 1, alias: "redirect", before: function (data) { return data.reduce((redirects, page) => { if (Array.isArray(page.data.redirectFrom)) { for (let url of page.data.redirectFrom) { redirects.push({ to: page.url, from: url }); } } else if (typeof page.data.redirectFrom === 'string') { redirects.push({ to: page.url, from: page.data.redirectFrom }); } return redirects; }, []); }, addAllPagesToCollections: false, }, permalink: "/index.html", eleventyExcludeFromCollections: true, } ---