Fixing Tags, Categories, and RSS in Our Eleventy Blog
What broke, why it broke, and how we fixed it
Published on
by 1 min read min read
•
Over a short QA pass, I found three regressions:
- Tags pages were 404ing
- Categories index existed but showed no categories
- The RSS feed at /feed.xml was 404ing
Here’s how we addressed each one.
Tags 404
- Problem: The template at
src/tags.njk
expected acollections.tagList
for pagination, but no such collection was defined. - Fixes:
- Added a
tagList
collection in.eleventy.js
that reads tags fromsrc/blog/**/*.md
and de-duplicates by slug to avoid permalink collisions. - Added a tags index page
src/tags/index.njk
that lists all tags with counts.
- Added a
Key code: .eleventy.js
addCollection("tagList", ...)
returns a unique, sorted list of tag names.
Categories empty
- Problem: The index page at
src/categories/index.njk
expectedcollections.categoryList
, which didn’t exist. - Fixes:
- Added a
categoryList
collection in.eleventy.js
by pulling thecategory
frontmatter from posts. - Per-category archive pages are generated by
src/categories.njk
with pagination over the category list. - Resolved an output conflict by disabling a redundant
src/category.njk
(nowpermalink: false
).
- Added a
RSS 404
- Problem:
src/feed.xml
referencedcollections.posts
and used anhtmlToAbsoluteUrls
filter that wasn’t defined yet. When collections or filter initialization failed, the feed failed to build. - Fixes:
- Confirmed a
posts
collection sourcing fromsrc/blog/**/*.md
(sorted by date desc) in.eleventy.js
. - Implemented a lightweight
htmlToAbsoluteUrls
filter to convert relative links in post content to absolute URLs usingsite.url
.
- Confirmed a
Result
/tags/
works and lists tags; individual tag pages paginate correctly/categories/
shows categories with counts and links to per-category pages/feed.xml
builds and includes the latest posts
If you want to extend this further, consider:
- Adding tag or category descriptions
- Hiding utility tags (already ignoring
all
,nav
,post
,posts
) - Using a custom slug function if you need locale-specific slugs
Happy shipping!

About Brennan Kenneth Brown
Queer Métis JAMstack developer, writer, and advocate for a human-centric web.
About 🍓 Berry House
Hi. We're here to help you create and share meaningful work and art with the world. Whether you're looking to amplify your writing or build an independent website, we're here to help.
Join the Berry House Newsletter
Get thoughtful essays and updates on digital writing, JAMstack, and the IndieWeb delivered to your inbox. No spam ever.
Related Posts
Responses
Loading webmentions...