Quarto equivalent to "exclude:" YAML command in distill

I am moving a distill website to quarto. 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 rendering process?

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.
1 Like

Thanks! _internal did the trick, just as you wrote.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.