quarto-dev / quarto-dev/quarto-cli
`quarto render` calls that produce `.md` should ignore that `.md` file in additional renders
@cscheid is already working on this.
Since Dec 2, 2024.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
In a simple default project (a) Quarto file/s have format: gfm (github flavored markdown). Rendering each file individually only create an .md file, as it should. If none of the files have been rendered, a global project render via quarto render only generates .md files. However, if a .md file already exists, quarto render also creates an html file output.
Steps to reproduce
Create a temporary directory and enter it, create a basic default Quarto project and a minimal .qmd file with gfm format; render the project for the first time:
temp_dir=$(mktemp -d) && cd $temp_dir
echo 'project:
title: "tmp"' > _quarto.yml
echo '---
title: "Index"
format: gfm
---' > index.qmd
quarto render
ls -l
Output:
pandoc
to: >-
commonmark+autolink_bare_uris+emoji+footnotes+gfm_auto_identifiers+pipe_tables+strikeout+task_lists+tex_math_dollars
output-file: index.md
standalone: true
default-image-extension: png
metadata
title: Index
Output created: index.md
-rw-r--r-- 1 vpopov staff 24 Dec 2 13:56 _quarto.yml
-rw-r--r-- 1 vpopov staff 10 Dec 2 13:56 index.md
-rw-r--r-- 1 vpopov staff 35 Dec 2 13:56 index.qmd
Render again:
quarto render
ls -l
Output:
[1/2] index.qmd
[2/2] index.md
Output created: index.html
total 64
-rw-r--r-- 1 vpopov staff 24 Dec 2 13:56 _quarto.yml
-rw-r--r-- 1 vpopov staff 17084 Dec 2 13:56 index.html
-rw-r--r-- 1 vpopov staff 10 Dec 2 13:56 index.md
-rw-r--r-- 1 vpopov staff 35 Dec 2 13:56 index.qmd
drwxr-xr-x 3 vpopov staff 96 Dec 2 13:56 index_files
Expected behavior
Create all and only the formats specified in yaml headers, either in project settings or notebook settings; Consistently render the same type of output regardless of state of the filesystem.
Actual behavior
In a simple default project (a) Quarto file/s have format: gfm (github flavored markdown). Rendering each file individually only create an .md file, as it should. If none of the files have been rendered, a global project render via quarto render only generates .md files. However, if a .md file already exists, quarto render also creates an html file output.
Your environment
- IDE: zsh terminal
- MacOS 15.2
Quarto check output
Quarto 1.6.39
[✓] Checking environment information...
Quarto cache location: /Users/vpopov/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.6.39
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2024.05
Chromium: 869685
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/vpopov/Library/TinyTeX/bin/universal-darwin
Version: 2024
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.12.1 (Conda)
Path: /opt/miniconda3/bin/python
Jupyter: 5.5.0
Kernels: ir, python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.4.2
Path: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources
LibPaths:
- /Users/vpopov/Library/R/arm64/4.4/library
- /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
knitr: 1.48
rmarkdown: 2.28
[✓] Checking Knitr engine render......OK
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.
Assessment
This issue has not been assessed yet.