Skip to content

Preview not updated on changes to included files #2795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
4 tasks done
knuesel opened this issue Oct 11, 2022 · 9 comments
Open
4 tasks done

Preview not updated on changes to included files #2795

knuesel opened this issue Oct 11, 2022 · 9 comments
Assignees
Labels
bug Something isn't working preview issues related to the `preview` command
Milestone

Comments

@knuesel
Copy link
Contributor

knuesel commented Oct 11, 2022

Bug description

Not sure if this qualifies as bug or feature request: running quarto preview on a file such as

---
title: Title
---

Text.

{{< include b.qmd >}}

the preview is updated when this file is changed, but not when the included b.qmd is changed.

Tested with quarto 1.1.251 and 1.2.203 on Pop!_OS 22.04.

Checklist

  • 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.
@knuesel knuesel added the bug Something isn't working label Oct 11, 2022
@cscheid cscheid added this to the Future milestone Oct 11, 2022
@cscheid
Copy link
Collaborator

cscheid commented Oct 11, 2022

It's certainly a bug, but a fix would be spread all over the quarto codebase as is. We're planning improvements for this that will make the fix easier. (in other words, it's on our radar, but don't expect it in the next 2-5 months)

@danieltomasz
Copy link

When files are included additionally as resources in _quarto.yml the content is updating for html, but not for pdf

@maikol-solis
Copy link

When files are included additionally as resources in _quarto.yml the content is updating for html, but not for pdf

Hi! I'm also interested in this feature.

How do you declare the included files in _quarto.yaml to update the whole project as they change?

Best.

@skwde
Copy link

skwde commented Sep 4, 2024

@cscheid can you give a (new) estimate when / if this will be fixed?

@mcanouil
Copy link
Collaborator

mcanouil commented Sep 4, 2024

It will be fixed when it will be fixed. The team is working on many things and time is not unlimited.
Please be mindful of the time.
Thank you!

@peekxc
Copy link

peekxc commented Sep 4, 2024

I think a simple fix would be to do what e.g. other SSG's do and just give the user the option to include what to watch.

Something like:

preview: 
  watch: 
    - "pages/*.qmd"
    - "resources/*.css" 

...or similar. That way, this wouldn't cause a massive change / disrupt in how includes work, and let's the user decide when a re-render needs to be triggers.

@cscheid cscheid added the preview issues related to the `preview` command label Sep 5, 2024
@cscheid
Copy link
Collaborator

cscheid commented Sep 5, 2024

We've accumulated a fair bit of preview bugs and improvements that we'll likely try to tackle in 1.7 or 1.8, and this would fit.

Up until recently, Quarto didn't have the knowledge about the include dependency graph, and now we do via the information in quarto inspect.

(to be clear, 1.7 and 1.8 are only expected to come out in Feb/Apr 2025.)

@einarpersson
Copy link

@cscheid I just stumbled on this also, it really hurts the workflow you'd want.

Did this make the 1.8? If not, I hope this thing can be prioritized next! :)

@cderv cderv modified the milestones: Future, v1.8 Apr 30, 2025
@cderv
Copy link
Collaborator

cderv commented Apr 30, 2025

Let's try to solve this for 1.8, among other issues with quarto preview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working preview issues related to the `preview` command
Projects
None yet
Development

No branches or pull requests

9 participants