A page with several feed listings writes `index-<id>.xml` files and no `index.xml`

オープン
#1,258 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
backend

調査の方向性

Start with crates/quarto-core/src/project/listing/feed/stage.rs, especially the output naming logic at lines 141–162 referenced in the issue, and read the linked plan's D7 decision. Compare behavior for multiple listings with feed: against Quarto 1, including feed filenames, merged items, and alternate links. Done means the chosen behavior is implemented or a warning is added for the changed feed URL, with the single-feed-listing case covered too.

索引モデルが issue の本文から書いたものです。

説明

In Quarto 1, a page with listings writes one feed, <stem>.xml, with the items of all listings on the page. Feed options come from the first listing that sets feed:. source

  const [dir, stem] = dirAndStem(source);
  const finalRelPath = relative(
    project.dir,
    join(dir, `${stem}.xml`),
  );
  // ...
  // Merge all the items
  const items: ListingItem[] = [];
  for (const descriptor of descriptors) {
    items.push(...descriptor.items);
  }

q2 writes one feed per listing with feed:. When more than one listing has it, each file is named <stem>-<listing-id>.xml and there is no <stem>.xml:

https://github.com/quarto-dev/q2/blob/c7eb545598574c527dc45bdc3745b404fe5b7190/crates/quarto-core/src/project/listing/feed/stage.rs#L141-L162

# _quarto.yml
project:
  type: website
website:
  title: Blog
  site-url: https://example.com
# index.qmd
---
title: Blog
listing:
  - id: y2026
    contents: "posts/2026-*.qmd"
    feed: true
  - id: y2025
    contents: "posts/2025-*.qmd"
    feed: true
---

q2 0.47.0: index-y2026.xml and index-y2025.xml, and two <link rel="alternate"> in index.html. Quarto 1.12.3: one index.xml with all the posts.

On my blog, the index page has one listing per year. Moving to that layout changed the feed URL from /index.xml to /index-<id>.xml without any message, which breaks existing subscribers. I worked around it with a first listing without id that carries the feed, and an empty template.

This is a deliberate choice (D7 in claude-notes/plans/2026-05-08-listings-L9-rss-feeds.md), based on one listing per page being the common case. The output also differs when only one listing among several has feed:: Quarto 1 writes index.xml with the items of all listings, q2 only with the items of that listing.

The plan mentions an opt-in feed-merge: true if users ask for Quarto 1 behavior. We could instead make the merge the default, so a site moving from Quarto 1 keeps its feed URL and content, and keep per-listing feeds as the opt-in. At least, we could warn when a page with several feed listings no longer writes <stem>.xml.

主要言語
Rust
スター
316
フォーク
23
平均マージ
6時間 50分
マージ済み PR(30日)
230

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

quarto-dev/q2 のほかの issue

quarto-dev/q2 の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。