feat: add slashes index to navigation

- Add "/" link to desktop and mobile nav pointing to /slashes/
- Update pages collection to find content/*.md (root-level pages)
- Keeps About and Now as featured nav items, with / for all pages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ricardo
2026-02-01 13:58:59 +01:00
parent 690b5f09f5
commit c01bdd331f
2 changed files with 6 additions and 3 deletions

View File

@@ -112,6 +112,7 @@
<a href="/">Home</a>
<a href="/about/">About</a>
<a href="/now/">Now</a>
<a href="/slashes/" title="All slash pages">/</a>
{# Blog dropdown #}
<div class="nav-dropdown" x-data="{ open: false }" @mouseenter="open = true" @mouseleave="open = false">
<a href="/blog/" class="nav-dropdown-trigger">
@@ -166,6 +167,7 @@
<a href="/">Home</a>
<a href="/about/">About</a>
<a href="/now/">Now</a>
<a href="/slashes/" title="All slash pages">/</a>
{# Blog section #}
<div class="mobile-nav-section">
<button type="button" class="mobile-nav-toggle" @click="blogOpen = !blogOpen">

View File

@@ -340,11 +340,12 @@ export default function (eleventyConfig) {
});
// Pages collection - root-level slash pages (about, now, uses, etc.)
// These are stored in content/pages/ and output to /{slug}/
// These are stored directly in content/ root (not in subdirectories)
// Created via Indiekit's page post type with path: "{slug}.md"
eleventyConfig.addCollection("pages", function (collectionApi) {
return collectionApi
.getFilteredByGlob("content/pages/**/*.md")
.sort((a, b) => (a.data.title || "").localeCompare(b.data.title || ""));
.getFilteredByGlob("content/*.md")
.sort((a, b) => (a.data.title || a.data.name || "").localeCompare(b.data.title || b.data.name || ""));
});
// All content combined for homepage feed