Skip to content

output-file with .html extension loses the markdown-format output in multi-format project renders (website render fails at move step) #14669

Description

@cscheid

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:

quarto render

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions