Default and grid listings show categories and reading time that Quarto 1 leaves out
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 77/100
Línea de trabajo
Empieza por la lógica de los campos predeterminados en crates/quarto-core/src/project/listing/config.rs (líneas 996–1026) y cómo se conservan los campos en crates/quarto-core/src/project/listing/binding.rs (líneas 92–110); compara los valores predeterminados de Quarto 1 en las secciones enlazadas de website-listing-read.ts. Reprodúcelo con el listado mínimo del issue y los comandos grep. El trabajo estará terminado cuando el listado predeterminado coincida con el comportamiento descrito: las categorías y el tiempo de lectura aparecen solo cuando se solicitan explícitamente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug description
A default or grid listing without a fields: key shows two extra parts in q2.
Each item gets a category chip row and a "1 min read" line.
Quarto 1 draws neither for the same input, so a site that moves to q2 gets a different card layout without changing any listing option.
The q2 design note means to copy the Quarto 1 defaults from hydrateListing, but its table lists eleven fields, adding categories, filename, file-modified and reading-time:
The code follows that table:
Quarto 1 has six fields for default and five for grid:
It adds categories only when the listing sets categories::
A defaulted field is kept in q2 when at least one item carries it.
Every document has a reading time, so the line always appears, and any item with categories gets its chips:
Steps to reproduce
_quarto.yml:
project:
type: website
index.qmd:
---
listing:
contents: posts
---
posts/a.qmd:
---
title: A
categories: [alpha]
---
Text.
With q2:
q2 render
grep -c 'listing-reading-time"' _site/index.html
grep -c 'class="listing-category"' _site/index.html
With Quarto 1:
quarto render
grep -c 'listing-reading-time"' _site/index.html
grep -c 'class="listing-category"' _site/index.html
Actual behavior
q2 prints a count of 2 for the reading time and 1 for the category, with this markup:
<div class="listing-categories"><div class="listing-category" onclick="window.quartoListingCategory('YWxwaGE='); return false;">alpha</div></div>
<p><span class="listing-reading-time">1 min read</span></p>
Quarto 1 prints 0 for both.
Expected behavior
The item shows the title and description, as in Quarto 1.
Categories appear when the author sets categories: true on the listing or lists categories in fields:.
Reading time appears only when fields: names it.
Your environment
- q2:
Q2 (quarto 2) 0.40.0-nightly.20261101(nightly built from a2a1cb9). - Quarto 1 for comparison: 1.12.0 (pre-release).
- OS: macOS 27.2 (arm64).
- Terminal, no IDE.
- Lenguaje dominante
- Rust
- Estrellas
- 293
- Forks
- 20
- Merge medio
- 5 h 38 min
- PR fusionados (30 d)
- 199
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de quarto-dev/q2
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
quarto-dev/q2#1103 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
quarto-dev/q2#1095 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quarto-dev/q2#957 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
quarto-dev/q2#1115 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 1-2 días Aptitud para principiantes 52/100
quarto-dev/q2#1111 ·
Los mantenedores suelen responder en 1 día
Todos los issues de quarto-dev/q2
Issues similares
-
area:frontend kind:bug priority:p2 ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
bug priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
storytold/vectorcraft#6143 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
rubys/roundhouse#1917 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día