jackyzha0 / quartz

🌱 a fast, batteries-included static-site generator that transforms Markdown content into fully functional websites
https://quartz.jzhao.xyz
MIT License
6.74k stars 2.45k forks source link

Linking to multiple tags as a way of progressive filtering #1422

Open woerndl opened 1 week ago

woerndl commented 1 week ago

Hello,

I wanted to check if it’s currently intended to link to stacked tags for progressive filtering?

In the sense that: /tags/fruits shows all #fruits, but e.g. /tags/fruits+berries shows only notes that are both #fruits and #berries. Stacking tags would probably require a format like tag1+tag2 or concatenation fruits/berries/fruits/citrus since tag hierarchies like fruits/berries (as a single tag) are already supported.

Is this already achievable or considered a feature idea?

aarnphm commented 6 days ago

Hi there, I think this is possible.

Are you thinking about for search or just general tag concatenation?

woerndl commented 6 days ago

Mostly general tag concatenation in the explorer/via link. For larger content structures that have entries with multiple tags. So users can find and narrow down what they are looking for. It's probably not trivial because it might make sense to show the remaining number of available notes to filter. Say we have 5 fruits and 3 of these fruits are berries, one of those berries is red.

Nothing selected OR Fruits selected

Fruits (7) ←
Red (2)
Apples (2)
Berries (3)
Citrus (2)

Fruits AND Red selected (showing remaining options)

Fruits (2) ←
Red (2) ←
Apples (1)
Berries (1)
Citrus (0)

Meaning that the user can narrow down only one more time since there is only one entry for a either a berry or apple that is red. But in reality tag combinations that aren't possbile might just be removed, making it:

Fruits AND Red AND Berries selected (tag combinations that result in 0 removed)

Fruits (1) ←
Red (1) ←
Berries (1) ←

(Selecting Fruits doesn't make a difference, because red is more discrete, but the point is the user doesn't have to know.)