Skip to main content

Module listings

Module listings 

Source
Expand description

Named, filtered, paginated listings (#587).

crate::pagination already paginates: every dated page, newest first, at /page/N/. One sequence, no name, no way to ask for a subset. A site with a decade of posts, three languages and a dozen tags cannot browse any of that.

A listing is a named subset with its own URL space:

[[listings]]
name     = "archive"        # /archive/ and /archive/page/N/
title    = "Archive"
per_page = 20

[[listings]]
name     = "rust"
title    = "Writing about Rust"
tag      = "rust"
after    = "2026-01-01"
by_year  = true             # also /rust/2026/

Every filter is optional and they combine with AND — a listing with no filters is every dated page, which is what /page/N/ already gives you under a name of your choosing.

What this deliberately does not have is the issue’s “custom predicate”. A predicate is code, and a config file that grows an expression language has usually taken a wrong turn; a site needing one can write a plugin, which is the supported way to run code in a build.

Structs§

ListingConfig
One named listing.