简体   繁体   English

Quarto 相当于 distill 中的“排除:”YAML 命令

[英]Quarto equivalent to "exclude:" YAML command in distill

In R, I am moving a distill website to quarto website.在 R,我正在将一个提炼网站移动到四开本网站。 In distill, I can prevent all the Rmd documents in a directory called "internal" from being knitted by adding this to the _site.yml在 distill 中,我可以通过将此添加到 _site.yml 来防止编织名为“internal”的目录中的所有 Rmd 文档

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?是否有四开本等价物,以某种方式指示在编织/渲染过程中应排除哪些目录?

Thanks to C Wickham for answering the question:感谢C Wickham 回答问题:

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 _.将 internal/ 重命名为 _internal/,并依赖自动忽略前缀为 _ 的文件和目录。

Explicitly, specifying that files in internal/ should not be rendered in _quarto.yml, eg (edited from example in docs linked above):明确地,指定 internal/ 中的文件不应在 _quarto.yml 中呈现,例如(根据上面链接的文档中的示例编辑):

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. "*.qmd" 是描述哪些文件应该被渲染所必需的,所以如果你有一些 .Rmd 文件,你可能需要添加另一行 "*.Rmd" 以确保它们被渲染。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM