Bug description
In a project render that pairs format: html with a markdown format (e.g. commonmark, as in llms.txt workflows), setting output-file to a name with an .html extension (e.g. output-file: index.html, which nbdev sets on every page it generates) breaks the render of the markdown twin:
- Website project:
quarto render fails with a hard error at the output-move step — it tries to move <name>.html.md from the project root into _site, but the file was never written. The already-rendered index.html and site_libs/ are left stranded in the project root.
- Default project:
quarto render exits 0, but the markdown output is silently missing — no .md file is produced anywhere. Presumably the same underlying bug with a quieter symptom.
Notes from narrowing this down:
Steps to reproduce
_quarto.yml:
project:
type: website
format:
html: default
commonmark: default
index.qmd:
---
title: Home
output-file: index.html
---
Hello.
Then:
Actual behavior
ERROR: NotFound: No such file or directory (os error 2): rename '<project>/index.html.md' -> '<project>/_site/index.html.md'
Stack trace:
at Object.renameSync (ext:deno_fs/30_fs.js:267:3)
at safeMoveSync (file:///.../src/deno_ral/fs.ts:102:10)
at renderProject (file:///.../src/command/render/project.ts:526:9)
After the failed render, index.html and site_libs/ sit in the project root instead of _site, and no index.html.md exists anywhere (watching the directory during the render confirms it is never created).
With project: type: default instead: exit code 0, index.html is produced, and the commonmark output silently does not exist.
Expected behavior
The render succeeds and produces _site/index.html and _site/index.html.md, matching what the single-format render (quarto render index.qmd --to commonmark) already produces.
Your environment
- macOS 26.x (Darwin 25.5.0), arm64
- Reproduced with Quarto 1.9.38 (release) and quarto-cli
main @ 8577ed1 (dev build)
Quarto check output
Dev build at 8577ed1; quarto check unremarkable (Pandoc 3.8.3, Deno 2.4.5).
Bug description
In a project render that pairs
format: htmlwith a markdown format (e.g.commonmark, as in llms.txt workflows), settingoutput-fileto a name with an.htmlextension (e.g.output-file: index.html, which nbdev sets on every page it generates) breaks the render of the markdown twin:quarto renderfails with a hard error at the output-move step — it tries to move<name>.html.mdfrom the project root into_site, but the file was never written. The already-renderedindex.htmlandsite_libs/are left stranded in the project root.quarto renderexits 0, but the markdown output is silently missing — no.mdfile is produced anywhere. Presumably the same underlying bug with a quieter symptom.Notes from narrowing this down:
output-file: index(no extension) works correctly in both project types (_site/index.html+_site/index.md).output-file: other.htmlon a non-index page fails identically.quarto render index.qmd --to commonmarkcorrectly produces_site/index.html.md(so the collision-avoiding<name>.html.mdnaming itself works; it's the multi-format project render that loses the file).maindev build (8577ed1).site_libsand the.mdtwin outside_site, so some form of this misbehavior is longstanding. (Found while reproducing quarto-nav.js's index.html clean-URL rewrite mangles alternate-format links on index pages #14667, which needs this config to exercise its client-side bug end-to-end.)Steps to reproduce
_quarto.yml:index.qmd:Then:
Actual behavior
After the failed render,
index.htmlandsite_libs/sit in the project root instead of_site, and noindex.html.mdexists anywhere (watching the directory during the render confirms it is never created).With
project: type: defaultinstead: exit code 0,index.htmlis produced, and the commonmark output silently does not exist.Expected behavior
The render succeeds and produces
_site/index.htmland_site/index.html.md, matching what the single-format render (quarto render index.qmd --to commonmark) already produces.Your environment
main@ 8577ed1 (dev build)Quarto check output
Dev build at 8577ed1;
quarto checkunremarkable (Pandoc 3.8.3, Deno 2.4.5).