`--output-dir` fails in a project that sets `project.output-dir`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
- 領域
- build-system
調査の方向性
crates/quarto-core/src/render_to_file.rsから始めます。ここでは--output-dirがページ出力に適用され、resource resolverが設定されています。HTMLの経路をdocxおよびtypstの処理と比較してください。crates/quarto-core/src/resource_resolver.rsで許可されたルートのチェックを確認してください。--output-dir outでレンダリングするとページとサポートファイルがoutの下に書き込まれ、_siteには手を加えず、概要にoutが表示されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Bug description
To compare q2 with Quarto 1 on the dashboard from #1131, I wanted the q2 output in its own folder, away from the _site/ that Quarto 1 publishes.
The project sets output-dir: _site, and q2 render index.qmd --output-dir out stops on the first support file.
The relative and the absolute form of the path give the same error.
The page itself follows the option: when --output-dir is given, the project output-dir is skipped:
The writes, though, go through a resource resolver whose site_root is still the project output-dir, and that root is the only place the output sink accepts.
A comment in the same file describes this stock resolver and moves site_root for docx, typst and similar formats, but HTML keeps it:
Steps to reproduce
_quarto.yml:
project:
type: default
output-dir: _site
index.qmd:
---
title: Hello
---
Hello.
q2 render index.qmd --output-dir out
quarto render index.qmd --output-dir out
Actual behavior
q2 writes nothing:
Rendering project: <dir> (type: default)
error: <dir>/index.qmd: output destination <dir>/out/index_files/quarto/quarto-theme-d9a3a2debf57bcb1.css is not under any allowed root (<dir>/_site)
Rendered 0 of 1 files to <dir>/_site — 1 error
The summary line names _site, not out.
Quarto 1 writes out/index.html and out/index_files/, and leaves _site/ alone.
Expected behavior
out/ gets the page and its support files, as with Quarto 1, and the summary names out.
Building the resolver with site_root set to the --output-dir value whenever the option is given would cover it.
Your environment
- q2:
q2 (quarto 2) 0.43.0-nightly.20261109(nightly built from 8f17e95), andq2 v0.42.0. - Quarto 1 for comparison: development build of quarto-dev/quarto-cli@fa74261.
- OS: macOS 27.2 (arm64).
- Terminal, no IDE.
- 主要言語
- Rust
- スター
- 302
- フォーク
- 22
- 平均マージ
- 5時間 6分
- マージ済み PR(30日)
- 207
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/q2 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
quarto-dev/q2#1155 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
quarto-dev/q2#1135 ·
メンテナーはふだん 1 日以内に返信
-
難易度 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時間 初心者へのやさしさ 77/100
quarto-dev/q2#1031 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
backlog priority: low ui
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
storytold/vectorcraft#6445 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area: cli kind:docs priority: P3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
tursodatabase/libsql#2312 ·
メンテナーはふだん 11 日以内に返信
-
`NodeOwned::size_in_bytes` does not count the `ChildrenNodesOwned` heap allocation (since #216)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
paritytech/trie#251 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信