quarto-dev / quarto-dev/quarto-cli

quarto preview does not re-render when a template-partial is edited

Open
#14,561 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug preview
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Reported in #10392 by a user iterating on a reveal.js custom title slide.

When a document or project uses template-partials: to override a Pandoc template partial, quarto preview does not re-render when the partial file itself is edited. The change only appears after stopping and restarting quarto preview.

format:
  revealjs:
    template-partials:
      - title-slide.html

Editing title-slide.html while quarto preview is running produces no re-render. Editing the .qmd does trigger a re-render that picks up the latest partial, so touching the source file is a workaround.

This is the template-partial analogue of two related cases: included files via {{< include >}} not triggering a re-render (#2795), and project pages serving stale HTML after a direct .qmd edit (#10392, fixed in #14548). In each, the watcher does not treat a non-input dependency of a rendered file as a re-render trigger.

We could add files referenced via template-partials: to the preview watch list, mapping each partial back to the documents that consume it.

Related: #10392, #2795, #14548.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how quarto preview builds its watch list and handles files referenced through template-partials. Compare the related cases in #2795 and #14548, then verify that editing a partial re-renders every consuming document without restarting preview.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.