Collections can now turn tags and categories into their own paginated, crawlable landing pages β changelog/tag/feature/, blog/category/release/ β rendered with the collection's own index template. Ships with an array-aware groupby, a humanize filter, distinct titles for paginated and term pages, localizable pagination labels, and automatic breadcrumbs for term pages.
Grouping posts by a field was already possible with the groupby filter, but it lived on a single page. Taxonomies give every term its own paginated, crawlable landing page β and this release rounds out the collection story with a handful of supporting improvements. This very changelog groups its entries by tag (the links at the top).
taxonomiesDeclare which front-matter fields become taxonomies on the collection, alongside paginate/sort:
---
title: Changelog
collection: true
paginate: 10
taxonomies:
- name: tags # front-matter field to group on
path: tag # URL segment (defaults to name); use "tag" for a singular URL
paginate: 5 # per-term page size (defaults to the collection's paginate)
---
Shorthand: a bare string (taxonomies: [tags, category]) uses the field name as the URL segment and inherits the collection's paginate. Poops then writes a landing page per term β changelog/tag/feature/, blog/category/release/ β paginated, listed in the sitemap, kept out of the search index and nav.
Term pages render with the collection's own index template β no extra file. Branch on activeTerm to show a term view, and build tag links anywhere from collection.taxonomies:
{% if changelog.activeTerm %}
<h1>Tagged {{ changelog.activeTerm | humanize }}</h1>
{% for post in changelog.pageItems %}
<p><a href="{{ relativePathPrefix }}{{ post.url }}">{{ post.title }}</a></p>
{% endfor %}
{% pagination changelog %}
{% endif %}
Full guide: Tags & categories.
groupbyThe groupby filter now splits array-valued fields: a post with tags: [js, css] lands under both the js and css groups (previously the whole array was one key). This is what makes multi-tag taxonomies work, and it's just as useful in a template:
{% for group in blog.items | groupby("tags") %}
<h2>{{ group.key | humanize }}</h2>
{% endfor %}
humanize filterThe inverse of slugify: "static-site" β "Static Site". Handy for turning a slug or a raw tag into a display label. Available in both Nunjucks and Liquid.
Paginated pages no longer all share the landing page's <title> (and its og/jsonld metadata). Pages 2..N get a β Page N suffix, and each term page gets a Tag: Feature title β so search engines and social cards see a distinct title per page.
The β Page N suffix and the {% pagination %} tag's Previous/Next/of wording default to English but localize site-wide under site.pagination:
site:
pagination:
title: "{title} β Seite {n}" # {title}, {n}, {total} tokens
prev: ZurΓΌck
next: Weiter
of: von
The breadcrumb and jsonld filters resolve term pages to a Home βΊ Collection βΊ Tag: Term trail automatically β skipping the non-page tag/category URL segment and labelling the last crumb with the taxonomy. Nothing to configure.
Everything above is additive β existing sites build unchanged.