diff --git a/eleventy.config.js b/eleventy.config.js index 46f18c1..c3d215d 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -56,9 +56,6 @@ module.exports = function (eleventyConfig) { return true; }); }); - eleventyConfig.addFilter("orderBySectionOrder", (collection) => - collection.sort((a, b) => a.data.sectionOrder - b.data.sectionOrder) - ); eleventyConfig.addFilter("log", (value) => console.log(value)); return { diff --git a/src/index.njk b/src/index.njk index 2e7cf59..d230623 100644 --- a/src/index.njk +++ b/src/index.njk @@ -7,7 +7,7 @@ eleventyNavigation: tags: [ "MainPage" ] --- -{% for section in collections.MainPage | IsNotPage(page.url) | IsMainPageSection | orderBySectionOrder %} +{% for section in collections.MainPage | IsNotPage(page.url) | IsMainPageSection | sort(false, false, "data.sectionOrder") %} {% if not loop.first %}