Repository navigation
Description
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 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. - Default project:
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).- Not index-specific:
output-file: other.htmlon a non-index page fails identically. - Rendering a single file/format works:
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). - Reproduces identically with released 1.9.38 and current
maindev build (8577ed1). - Related history: the reporter of quarto-nav.js's index.html clean-URL rewrite mangles alternate-format links on index pages #14667 observed on 1.8.25 that this config routed
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:
project:
type: website
format:
html: default
commonmark: defaultindex.qmd:
---
title: Home
output-file: index.html
---
Hello.Then:
quarto renderActual 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).
Activity
Fix keep-md cleanup deleting the markdown output when `output-file` h…