You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Render fails when specifying both revealjs and html formats in _quarto.yml #4470
I'm using Quarto 1.2.335 via conda-forge on Ubuntu 20 LTS. I'm not using the RStudio IDE, just editing with vi.
This is related to #4469 somewhat: I encountered these two separate problems trying to accomplish the same goal: Render a webpage which displays a list of links to RevealJS presentations from the same build.
Render works fine until specifying a format.revealjs option, e.g. toc: true, in _quarto.yml, at which point render fails with the following error:
ERROR: NotFound: No such file or directory (os error 2), rename
'/path/to/quarto/project/index.html' -> '/path/to/quarto/project/_site/index.html'
Steps to reproduce:
Create project template
quarto create-project sscce-quarto-slides-in-website --type website
Create slides/index.qmd with format: 'revealjs' in front-matter.
Add link from index.qmd to slides/index.qmd
Add the following to the format section of _quarto.yml (I believe other settings will also trigger this):
revealjs:
toc: true
quarto render, observe the NotFound error
Note that an index.html file has been created outside of the _site directory
Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
Please format your issue so it is easier for us to read the bug report.
Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
Please document the operating system you're running. If on Linux, please provide the specific distribution.
The issue here is that html and revealjs both emit a .html file. Ideally, we'd issue a warning before overwriting those files, but we don't do that right now.
If you're working on a single file, the easiest solution is to change the name of the output file inside one of the formats with output-file: new-name.html.
If I understand your usecase correctly, you'd like a website where every file is rendered both as HTML and revealjs. I can't think of a simple way to make quarto work well in this scenario. (Edit: my hack doesn't work, see below)
If I understand your usecase correctly, you'd like a website where every file is rendered both as HTML and revealjs.
That's not quite what I'm looking for. I want each .qmd file to render as either a slide or as a HTML page, never both. All the pages I want to render as slides include format: revealjs in the front-matter and are in the slides directory, and I'd like everything else to render as a webpage!
Render works fine until specifying a format.revealjs option, e.g. toc: true, in _quarto.yml
The problem here is that when you add something to _quarto.yml, that does something different from what you're expecting. It's not only adding a default configuration. It's actually requesting quarto to render your website in that format.
I suspect you're trying to say "please set toc: true any time you see a revealjs format". We don't support that quite yet, but we do support a _metadata.yml in any directory which will be respected. So all you need to do is add
Thank you so much for clarifying this! That makes perfect sense, and it works beautifully. I think this can be closed as "user error". I have pushed a branch correctly-specify-revealjs-config to my repo which demonstrates how this should be done.
FWIW I also tried the hack you specified before you set my straight in your latest post, but when I clicked on a link (specified as [Slides](slides/index.qmd in my markdown), the link generated after render includes the extension twice: slides/index..reveal.html..reveal.html; I removed the leading dot and still got slides/index.reveal.html.reveal.html in both pre-release and 1.2.335.
Activity
MattF-NSIDC commentedon Feb 23, 2023
I just installed the preview
quarto-1.3.217-linux-amd64.debdistribution and re-tested this issue. It still occurs.cscheid commentedon Feb 23, 2023
The issue here is that
htmlandrevealjsboth emit a.htmlfile. Ideally, we'd issue a warning before overwriting those files, but we don't do that right now.If you're working on a single file, the easiest solution is to change the name of the output file inside one of the formats with
output-file: new-name.html.If I understand your usecase correctly, you'd like a website where every file is rendered both as HTML and revealjs. I can't think of a simple way to make quarto work well in this scenario. (Edit: my hack doesn't work, see below)
MattF-NSIDC commentedon Feb 23, 2023
That's not quite what I'm looking for. I want each
.qmdfile to render as either a slide or as a HTML page, never both. All the pages I want to render as slides includeformat: revealjsin the front-matter and are in theslidesdirectory, and I'd like everything else to render as a webpage!cscheid commentedon Feb 23, 2023
The problem here is that when you add something to
_quarto.yml, that does something different from what you're expecting. It's not only adding a default configuration. It's actually requesting quarto to render your website in that format.I suspect you're trying to say "please set
toc: trueany time you see a revealjs format". We don't support that quite yet, but we do support a_metadata.ymlin any directory which will be respected. So all you need to do is addto
slides/_metadata.yml.MattF-NSIDC commentedon Feb 23, 2023
Thank you so much for clarifying this! That makes perfect sense, and it works beautifully. I think this can be closed as "user error". I have pushed a branch
correctly-specify-revealjs-configto my repo which demonstrates how this should be done.FWIW I also tried the hack you specified before you set my straight in your latest post, but when I clicked on a link (specified as
[Slides](slides/index.qmdin my markdown), the link generated after render includes the extension twice:slides/index..reveal.html..reveal.html; I removed the leading dot and still gotslides/index.reveal.html.reveal.htmlin both pre-release and 1.2.335.Fixup user error in render config