Categories in a post's title block are not linked to the listing
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 57/100
Direzione di ricerca
Start by tracing how q2 renders listing pages and the .quarto-category markup, then compare the behavior described in src/resources/formats/html/quarto.js and the listings plan at claude-notes/plans/2026-05-05-listings-epic.md. Check how q2 knows which listings contain a page and where category links can be emitted at render time. Done means title-block categories link to a containing listing with the category filter, including the described listing selection behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In Quarto 1, the categories shown in a post's title block link back to the listing that contains the post, filtered on that category (#category=R). quarto.js does it at load time: it fetches listings.json, keeps the listings whose items include the current page, picks one (the nearest parent listing, else the listing the reader came from, else the first one) and wraps each .quarto-category in a link.
q2 renders the same markup (<div class="quarto-category">R</div>) but emits neither listings.json nor the script, so the categories are plain text. The listing side already works: with categories: true, the category sidebar filters the items, and index.html#category=R filters on load.
The listings epic notes defer listings.json until search lands (claude-notes/plans/2026-05-05-listings-epic.md). This issue is about the user-visible part: linking title-block categories to their listing.
Reproduction:
# _quarto.yml
project:
type: website
# index.qmd
---
title: Blog
listing:
contents: posts
categories: true
---
# posts/a/index.qmd
---
title: A post
categories: [R]
---
q2 render, open _site/posts/a/index.html: the "R" category is not a link. In Quarto 1 it links to the root listing (/index.html#category=R).
We could write the links at render time instead, since q2 knows which listings include a page: no listings.json, no fetch. The nearest parent listing, then the first one, can be chosen the same way as Quarto 1. Only the referrer case needs the browser.
Workaround used on cderv.dev: a small include-after-body script in the theme extension that links each category to the root index.html (cderv/quarto-ghostwriter#7).
- Lingua principale
- Rust
- Stelle
- 316
- Fork
- 23
- Merge medio
- 11h 49m
- PR unite (30g)
- 245
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di quarto-dev/q2
-
Heading anchor links have no icon: AnchorJS is initialised with an empty `icon`Forse già presa @cscheid l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
quarto-dev/q2#1419 ·
I maintainer di solito rispondono entro 1 giorno
-
bug testing windows
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
quarto-dev/q2#1346 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
quarto-dev/q2#1095 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
quarto-dev/q2#1418 ·
I maintainer di solito rispondono entro 1 giorno
-
bug readers-writers windows
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
quarto-dev/q2#1416 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di quarto-dev/q2
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Type: Enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
accessibility dom
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
LadybirdBrowser/ladybird#16598 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
opengeos/RustGIS#3490 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno