Indieweb Starter Blog
← Back to Blog

Fixing Tags, Categories, and RSS in Our Eleventy Blog

What broke, why it broke, and how we fixed it

Published on by [object Object]2 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 a collections.tagList for pagination, but no such collection was defined.
  • Fixes:
    • Added a tagList collection in .eleventy.js that reads tags from src/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.

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 expected collections.categoryList, which didn’t exist.
  • Fixes:
    • Added a categoryList collection in .eleventy.js by pulling the category 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 (now permalink: false).

RSS 404

  • Problem: src/feed.xml referenced collections.posts and used an htmlToAbsoluteUrls filter that wasn’t defined yet. When collections or filter initialization failed, the feed failed to build.
  • Fixes:
    • Confirmed a posts collection sourcing from src/blog/**/*.md (sorted by date desc) in .eleventy.js.
    • Implemented a lightweight htmlToAbsoluteUrls filter to convert relative links in post content to absolute URLs using site.url.

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!

Your Name

About Your Name

Your author bio goes here. Describe yourself and what you write about.

About Your Name

I'm passionate about thoughtful writing, meaningful connections, and building a more human web. This is my corner of the internet where I share ideas, experiences, and discoveries.

Join the Newsletter

Get thoughtful updates delivered to your inbox. No spam, just meaningful content.

Related Posts

Responses

Loading webmentions...