Small Changes...
Instead of pagination I added a breadcrumb path to the top of each page as part of the header.
Also made some others changes listed in the Change Log.
To add breadcrumbs I added this to the .eleventy.js file:
eleventyConfig.addFilter('breadcrumbs', (url, allPages) => {
const parts = url.split('/').filter(Boolean);
const breadcrumbs = [];
let currentPath = '';
for (const part of parts) {
currentPath += `/${part}`;
const matchingPage = allPages.find(page => page.url === currentPath + '/' || page.url === currentPath);
if (matchingPage) {
breadcrumbs.push({
url: matchingPage.url,
title: matchingPage.data.title
});
}
}
return breadcrumbs;
});
and the html in the _includes/breadcrumbs.njk file looks like this:
<nav aria-label="Breadcrumb">
<ul class="breadcrumbs">
<li>
<a href="/">Home</a>
</li><span>/</span>
<li>
<a href="/blog/">Blog</a>
</li><span>/</span>
<li>
<a href="/blog/small-changes/">Small Changes...</a>
</li></ul>
</nav>