Build site_nav without tag

This commit is contained in:
cheddar 2025-04-17 08:58:05 -04:00
parent 22cfae69db
commit 8f5bbf81db
No known key found for this signature in database
4 changed files with 1 additions and 4 deletions

View file

@ -1,6 +1,5 @@
--- ---
title: About Me title: About Me
tags: site
nav_order: 3 nav_order: 3
--- ---

View file

@ -1,6 +1,5 @@
--- ---
title: Home title: Home
tags: site
nav_order: 1 nav_order: 1
--- ---

View file

@ -1,6 +1,5 @@
--- ---
title: Series title: Series
tags: site
nav_order: 2 nav_order: 2
--- ---

View file

@ -15,7 +15,7 @@ export default async function(eleventyConfig) {
eleventyConfig.addCollection("site_nav", collectionsApi => { eleventyConfig.addCollection("site_nav", collectionsApi => {
return collectionsApi. return collectionsApi.
getFilteredByTag("site"). getAll().
filter(page => page.data.nav_order). filter(page => page.data.nav_order).
sort((a, b) => a.data.nav_order - b.data.nav_order); sort((a, b) => a.data.nav_order - b.data.nav_order);
}); });