Open mine-cetinkaya-rundel opened 1 year ago
The issue seems to be a conflict, as license.qmd
will be rendered as license.md
which seems to confuse Quarto since there is LICENSE.md
.
Renaming license.qmd
solves the issue.
This is something that would be handled better via:
Thanks for the report!
I also wonder if this is a filesystem case sensitive vs case preservation issue, with license.md vs LICENSE.md, etc.
FYI, I tried on MacOS same version as Mine, but using VSCode.
right. macOS is case preserving but not sensitive, so rendering LICENSE.qmd would overwrite license.md. But linux is case sensitive, which would create two separate files LICENSE.md and license.md
(Computers were a mistake)
Lots of fun little interactions happening here.
I can repro this in 1.4 (and sort of in 1.3, see below), so it's not a regression AFAICT. What's happening here in 1.4 is "simple":
$ quarto render
[1/4] LICENSE.md
[2/4] index.qmd
processing file: index.qmd
1/3
2/3 [unnamed-chunk-1]
3/3
output file: index.knit.md
[3/4] about.qmd
processing file: about.qmd
1/3
2/3 [unnamed-chunk-1]
3/3
output file: about.knit.md
[4/4] license.qmd
The first line of quarto output shows that LICENSE.md
is getting rendered by quarto. This is totally a macOS+windows vs Linux thing. LICENSE.md
produces LICENSE.html
, and license.qmd
produces license.html
. On Linux, those are different files, but on macOS and windows, they're not.
To avoid emitting LICENSE.html from LICENSE.md, add something like this to _quarto.yml:
project:
type: website
render:
- "*.qmd"
- "!LICENSE.md"
In 1.3, the story is a bit more fun. In 1.4, we've added a feature that partial outputs are prefixed by their format extension. When license.qmd
gets rendered to license.html
, in 1.4 we go through license.html.md
. In 1.3, we use license.md
as the intermediate file, which (on macOS and Windows) overwrites LICENSE.md
. The first rendering fails, but the second succeeds (after having damaged your project in the process!):
$ quarto-1.3.450 render
[1/4] LICENSE.md
[2/4] index.qmd
processing file: index.qmd
1/3
2/3 [unnamed-chunk-1]
3/3
output file: index.knit.md
[3/4] about.qmd
processing file: about.qmd
1/3
2/3 [unnamed-chunk-1]
3/3
output file: about.knit.md
[4/4] license.qmd
ERROR: NotFound: No such file or directory (os error 2), rename '/Users/cscheid/Desktop/daily-log/2023/12/04/test-website-license/LICENSE.html' -> '/Users/cscheid/Desktop/daily-log/2023/12/04/test-website-license/_site/LICENSE.html'
NotFound: No such file or directory (os error 2), rename '/Users/cscheid/Desktop/daily-log/2023/12/04/test-website-license/LICENSE.html' -> '/Users/cscheid/Desktop/daily-log/2023/12/04/test-website-license/_site/LICENSE.html'
at Object.renameSync (deno:runtime/js/30_fs.js:175:9)
at renderProject (file:///Users/cscheid/repos/github/cscheid/quarto-regress/releases/v1.3.450/bin/quarto.js:86832:22)
at async Command.fn (file:///Users/cscheid/repos/github/cscheid/quarto-regress/releases/v1.3.450/bin/quarto.js:90856:32)
at async Command.execute (file:///Users/cscheid/repos/github/cscheid/quarto-regress/releases/v1.3.450/bin/quarto.js:8437:13)
at async quarto (file:///Users/cscheid/repos/github/cscheid/quarto-regress/releases/v1.3.450/bin/quarto.js:127545:5)
at async file:///Users/cscheid/repos/github/cscheid/quarto-regress/releases/v1.3.450/bin/quarto.js:127563:9
$ quarto- render
[1/3] index.qmd
processing file: index.qmd
1/3
2/3 [unnamed-chunk-1]
3/3
output file: index.knit.md
[2/3] about.qmd
processing file: about.qmd
1/3
2/3 [unnamed-chunk-1]
3/3
output file: about.knit.md
[3/3] license.qmd
Output created: _site/index.html
That's probably why you thought there was no 1.3 problem.
Two related issues:
These are all enhancements, though, and not really a 1.4 bug.
Bug description
I have a website project with a
LICENSE.md
file and alicense.qmd
file. The idea was thatLICENSE.md
is for folks perusing the repo (and used to seeing that file in GitHub repos) andlicense.qmd
can be a page on my actual website. I'm fairly certain this wasn't a problem a couple of months ago when I first put this project together, but today with 1.4.366 it fails to render with the error:And this happens whether
license.qmd
is listed in_quarto.yml
or not.Steps to reproduce
Clone https://github.com/mine-cetinkaya-rundel/test-website-license and render it.
Expected behavior
No response
Actual behavior
No response
Your environment
Quarto check output