Philippe Massicotte
Philippe Massicotte

Reputation: 1539

How to prevent Quarto to rebuild blog site every time?

I have a blog built around Quarto. As mentioned in the documentation, I have set freeze: auto in _quarto.yml to prevent rendering old posts (see here: https://github.com/PMassicotte/blog/blob/42f58d0126936a6cf13b7765a3a416e3c5d6cb39/_quarto.yml#L56).

However, it seems that all pages are still getting rendered on every push on GitHub (see: https://github.com/PMassicotte/blog/actions/runs/3887051025/jobs/6632859518#step:7:46).

Is there anything I am missing out?

Upvotes: 2

Views: 730

Answers (1)

giocomai
giocomai

Reputation: 3528

If you set freeze: auto code chunks won't be re-processed, but (e.g. unlike what happens with blogdown) every page will still be passed to pandoc and re-generated. Even if each page is re-rendered, this should still be very quick even if your website has a large number of pages, considering that code chunks are not re-run.

This design choice is apparently due to the fact that quarto has dynamic features (e.g. the possibility to list pages) that would require output to be updated, even if the specific page has not been changed since the latest render.

Long term, this will likely be approached differently through more systematic checks of internal dependencies across pages, but until then, if you only want to see updated the pages that have changed since the last render (keeping in mind that lists to other articles possibly included in specific blog posts would also not be updated), you should use quarto preview rather than quarto render.

For more details and context, see the these discussions on the official GitHub repository:

Upvotes: 3

Related Questions