quarto-dev / quarto-dev/quarto-cli
`output-file` parameter follows file location, not project (`_quarto.yml`) location.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
Rendering outputs to parent directories using the output-file metadata parameter is not intuitive. Suppose I have the following structure:
.
|____quarto_files
| |____example.qmd
|_____quarto.yml
and in the example.qmd header I've set output-file: TUTORIAL.
Desired output when running quarto render from the projects' root directory is the following, with TUTORIAL.md in the projects' root directory:
.
|____quarto_files
| |____example.qmd
| |____TUTORIAL_files
|____TUTORIAL.md
|_____quarto.yml
But achieved output is the following, with TUTORIAL.md original location being used as reference, meaning it is created inside the quarto_files directory:
.
|____quarto_files
| |____TUTORIAL.md
| |____example.qmd
| |____TUTORIAL_files
|_____quarto.yml
The only way to achieve the desired output is by setting example.qmd header such that output-file: ../TUTORIAL. I understand how this isn't necessarily wrong, but since I have set execute-dir: project, this seems inconsistent.
VERSIONS
Quarto: 1.1.149
OS: Ubuntu 20.04.3 LTS
Checklist
- Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- Please format your issue so it is easier for us to read the bug report.
- Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- Please document the operating system you're running. If on Linux, please provide the specific distribution.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Recreate the reported layout with quarto_files/example.qmd and _quarto.yml, using execute-dir: project and output-file: TUTORIAL, then run quarto render from the project root. Trace how the CLI resolves output-file relative to the source file versus the project location; done means the rendered TUTORIAL.md and TUTORIAL_files appear in the project root as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100