Quarto equivalent to "exclude:" YAML command in distill

448 Views Asked by At

In R, I am moving a distill website to quarto website. In distill, I can prevent all the Rmd documents in a directory called "internal" from being knitted by adding this to the _site.yml

exclude:
  - internal

The same trick does not work in quarto. Is there a quarto equivalent, somehow to indicate which directories should be excluded during the knitting/rendering process?

1

There are 1 best solutions below

0
On

Thanks to C Wickham for answering the question:

Yes, you can control which documents are knitted by specifying the render targets. Two options that might work for you are:

Renaming internal/ to _internal/, and relying on the automatic ignoring of files and directories with a prefix of _.

Explicitly, specifying that files in internal/ should not be rendered in _quarto.yml, e.g. (edited from example in docs linked above):

project:
  render:
    - "*.qmd"
    - "!internal/"

The "*.qmd" is necessary to describe which files should be rendered, so if you've got some .Rmd files as well, you might need to add another line with "*.Rmd" to make sure they are rendered.