Default and grid listings show categories and reading time that Quarto 1 leaves out
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 77/100
調査の方向性
crates/quarto-core/src/project/listing/config.rs (996~1026行) のデフォルトフィールドのロジックと、crates/quarto-core/src/project/listing/binding.rs (92~110行) でフィールドがどのように保持されるかを確認し、リンク先の website-listing-read.ts の各セクションにある Quarto 1 のデフォルトと比較します。issue の最小限の listing と grep コマンドで再現します。デフォルトの listing が記載された動作と一致すれば完了です。カテゴリと読了時間は、明示的に要求された場合にのみ表示されます。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 293
- フォーク
- 20
- 平均マージ
- 5時間 38分
- マージ済み PR(30日)
- 199
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/q2 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
quarto-dev/q2#1103 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
quarto-dev/q2#1095 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quarto-dev/q2#957 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
quarto-dev/q2#1115 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 1〜2日 初心者へのやさしさ 52/100
quarto-dev/q2#1111 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
storytold/photocraft#12183 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
area:render needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
bherbruck/solvecraft#13138 ·
-
testing
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
ratatui/ratatui-textarea#39 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
transit-audio/transit#369 ·