Extend .quartoignore to quarto render/preview as a way to exclude files without project.render
#14564
mcanouil
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Make
quarto renderandquarto previewhonour.quartoignorewhen discovering project input files, so files can be excluded from rendering without maintaining an explicitproject.renderallowlist in_quarto.yml.Problem
Today, to keep a
.qmd/.ipynbfile in the project but out of the render set, the options are:_or.(changes the filename/URL and affects more than rendering)..gitignore(couples "not rendered" to "not version-controlled", which is often wrong, e.g. drafts I do want in git).project.renderallowlist in_quarto.yml.The
project.renderallowlist is the only clean option, but it inverts the model: instead of saying "skip these few files" I must enumerate (and keep enumerating) everything I do want rendered. For large or fast-growing projects this is brittle and easy to forget when adding new files.Proposal
Treat
.quartoignore(already present and documented forquarto use template) as a denylist for project input discovery inquarto renderandquarto preview:.quartoignoreexclude matching files from the project render set.#comments and!negation, already parsed for templates..quartoignoreis skipped by both render and preview (so preview does not watch/re-render it either).This keeps "what to render" decoupled from "what to commit", needs no
_quarto.ymlchange, and matches the mental model users already have from.gitignore.Example
.quartoignore:quarto renderandquarto previewwould renderindex.qmdandposts/post-1.qmd, skippingnotes/scratch.qmd, with noproject.renderentry and no.gitignorechange.Why this matters
_/.)..quartoignore) and existing parsing, rather than introducing new config surface.Open questions
project.render,.gitignore, and engine ignore dirs..quartoignorefiles nest, or only the project root is read..quartoignorefor users who rely on its current template-only behaviour.Beta Was this translation helpful? Give feedback.
All reactions