Render Quarto file vs project in IDE: Suggestion

When using blogdown in Rstudio the workflow involves knitting the current file and building the whole web site as separate operations. The allows you to quickly render just the current file and serve the whole site.

By contrast, using Quarto in RStudio provides two render buttons in the IDE, one associated with the current open file located above the source and one located under the build tab. Both buttons do the same thing, render the entire site.

I argue this is wrong or a bug. File/render should render file. Build/render should render site. If you render a particular file from the Quarto CLI, just that file is rendered. That should be true in RStudio as well.

You might say "use freeze" but that is not the same thing. Freeze freezes the computational output, but the previously rendered HTML still gets overwritten. This is unnecessary overhead in most cases and prevents hand editing of the rendered HTML.

This is also a problem when porting old blog posts over to a new Quarto site. Some of my old posts break when re-rendering with computation. It's too late to freeze them since the old output is only in the finished HTML. I would like to render just the selected new files OR, alternatively, have a YAML option to prevent overwriting existing HTML on a file-by-file basis.

Thanks for listening.

1 Like

I agree and disagree. Power users (those who use both IDE and CLI) would benefit from the distinction. Intermediate level users would be confused and most users would be lost. Given the user population, I’d stay with the current setup. What would be great, though, is to make it an option in configuration (says the guy who doesn’t have to do it himself). Open an issue on the GitHub repo?

I believe quarto preview will be run which should be an incremental render, and not rendering the all website. It should be faster for iteration. See abou workflow for website Quarto – Creating a Website

Isn't it working properly for you ?

File rendered in a project are only those considered as rendering targets, so you can ignore all subfolder, or target some specific post only. Also calling quarto render <file or folder> should only run the selected files / folders
See about Quarto project logic, as websites is based on that too.

You should be able to include in your website some HTML file as-is - however, they won't get the navbar and all. So depending on your old HTML, there could be different option to include them as fragments, or raw html in other qmd file.

Regarding blogdown to Quarto migration, I think there are a few resources online that could have some useful hints (or not). A few of them:

Hope it helps.

If this was already things you knew and tried, then please do reach out to share missing pieces in quarto-dev/quarto-cli · Discussions · GitHub so that we keep improving.

Thank you

This is very helpful. Thanks. I discovered I can just paste my blogdown-rendered HTML into a qmd file and it renders pretty well. Blogdown doesn't put much styling in the final HTML and Quarto doesn't complain about anything. The images have to be manually placed in the qmd file since the paths have all changed but that is not too bad.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.