From f44feaf129394200599e7ecde6067768eb006c3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Wed, 11 Nov 2026 23:00:25 +0100 Subject: [PATCH] docs: add category-selection option to website listings --- docs/websites/website-listings.qmd | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/websites/website-listings.qmd b/docs/websites/website-listings.qmd index 71f4e63e7f..c4c1d8444b 100644 --- a/docs/websites/website-listings.qmd +++ b/docs/websites/website-listings.qmd @@ -297,6 +297,32 @@ You can choose between a few different display styles for categories: When multiple listings appear on the page, categories will be enabled based upon the option set in the first listing. If categories are enabled for the first listing, all listings on the page will contribute their item categories to the list of categories and all will be filtered when the user clicks a category. +### Category Selection + +{{< prerelease-callout 1.12 >}} + +By default, readers select one category at a time. +To let readers select more than one category, set the `category-selection` option to `multiple`: + +``` yaml +listing: + categories: true + category-selection: multiple +``` + +Each category in the sidebar is then a toggle button. +The listing shows the items that have at least one of the selected categories. + +A "Clear selection" button above the categories removes all selected categories. +In the `numbered` style, the "All" entry also removes them. +A category on a listing item replaces the selection with that one category. + +The page address keeps the selection, for example `#category=python,r`. +Thus you can share a link to a selection, and the browser Back button returns to the previous selection. + +The `category-selection` option has an effect only when `categories` is enabled. +When multiple listings appear on the page, the first listing that sets `category-selection` gives the value for all listings. + ## Feeds You can also have an RSS feed generated based upon the contents of a listing. This is great to allow your content to be syndicated or to be accessible via RSS Readers. Include a feed for your listing by including the `feed` option: