惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
博客园 - Franky
MyScale Blog
MyScale Blog
L
LangChain Blog
Martin Fowler
Martin Fowler
Recent Announcements
Recent Announcements
Stack Overflow Blog
Stack Overflow Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
量子位
A
About on SuperTechFans
C
Check Point Blog
大猫的无限游戏
大猫的无限游戏
Last Week in AI
Last Week in AI
小众软件
小众软件
Apple Machine Learning Research
Apple Machine Learning Research
I
InfoQ
V
Visual Studio Blog
Vercel News
Vercel News
B
Blog
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
U
Unit 42

The Eleventy Firehose

New Sponsorship Tiers for the Build Awesome Kickstarter Securely Publishing our Packages to npm Back Build Awesome Pro and make it easier to build for the web! The Possum Mascot, now with additional Awesome Build Awesome (11ty) (@11ty.dev) Build Awesome (11ty) (@11ty@neighborhood.11ty.dev) Build Awesome (11ty) (@11ty.dev) Build Awesome (11ty) (@11ty@neighborhood.11ty.dev) Build Awesome (11ty) (@11ty@neighborhood.11ty.dev) Build Awesome (11ty) (@11ty@neighborhood.11ty.dev) Build Awesome (11ty) (@11ty@neighborhood.11ty.dev) Build Awesome (11ty) (@11ty.dev) Release Import v1.0.20 · 11ty/import Release Import v1.0.21 · 11ty/import Build Awesome (11ty) (@11ty.dev) Build Awesome (11ty) (@11ty@neighborhood.11ty.dev) Build Awesome (11ty) (@11ty@neighborhood.11ty.dev) Build Awesome (11ty) (@11ty.dev) Cozy Keyboard Build and Build Awesome AMA Build Awesome (11ty) (@11ty@neighborhood.11ty.dev) Build Awesome (11ty) (@11ty.dev) A few demos of Editing and Collaboration in Build Awesome Pro (as always, AMA!) Build Awesome (11ty) (@11ty.dev) Build Awesome (11ty) (@11ty@neighborhood.11ty.dev) Build Awesome (11ty) (@11ty@neighborhood.11ty.dev) Bluesky: May 6, 2026 at 7:54:00 PM UTC An Awesome Theming Demo with Dave Gandy (and more Build Awesome AMA) Build Awesome (11ty) (@11ty@neighborhood.11ty.dev) Release v8.0.0 · 11ty/eleventy-plugin-vite Build Awesome Pro Kickstarter AMA
Quick Tip: Zero Maintenance Tag Pages for your Blog
Zach Leather · 2026-06-07 · via The Eleventy Firehose

This quick tip will show you how to automatically generate Tag Pages (lists of content tagged into a collection).

We’ll use pagination to automatically generate a template for each tag we want to link to.

Here’s a sample pagination template using Nunjucks:

---
pagination:
  data: collections
  size: 1
  alias: tag
permalink: /tags/{{ tag }}/
---

<h1>Tagged “{{ tag }}”</h1>

<ol>
{% set taglist = collections[ tag ] %}
{% for post in taglist | reverse %}
  <li><a href="{{ post.url }}">{{ post.data.title }}</a></li>
{% endfor %}
</ol>

First up notice how we’re pointing our pagination to iterate over collections, which is an object keyed with tag names pointing to the collection of content containing that tag.

Consider these two sample markdown posts, one using a tech tag and one using a personal tag:

---
title: My First Post
tags:
  - tech
---
---
title: My Second Post
tags:
  - personal
---

Our pagination template above will now generate two pages: /tags/personal/index.html and /tags/tech/index.html.

The great thing here is that we don’t have to manage our tag list in a central place. These tags can be littered throughout our content and individual tag pages will be created automatically.

Filtering / Excluding

Have a tag you’d like to exclude from this list? Use pagination filtering like this:

---
pagination:
  data: collections
  size: 1
  alias: tag
  filter:
    - tech
permalink: /tags/{{ tag }}/
---

Now Eleventy will only generate a /tags/personal/ template and tech will be ignored.

In Practice

This is currently in use on the eleventy-base-blog sample project. Check out source code in the tags.njk template and see a live demo.