Quarto 进阶设置

进阶设置

自动更新文件链接

::: {.callout-warning}

默认情况下,该功能对qmd后缀的文档不起作用,需要将.qmd文档类型设置为markdown。不过这样做的代价是无法使用qmd文档中的特性功能,如代码运行。

:::

比如:ChatGPT

开启提示和snippet

.qmd文件中,默认情况下snippet功能是关闭的,非常不方便。可以通过设定Quarto语言特性,打开snippet功能。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
"[quarto]": {

    "editor.wordWrap": "on",
    "editor.quickSuggestions": {
        "comments": "on",
        "other": "on",
        "strings": "on"
    },
    "editor.quickSuggestionsDelay": 250,
    "editor.snippetSuggestions": "inline",
    "editor.wordBasedSuggestions": false,
    "editor.suggestOnTriggerCharacters": true,
    "editor.unicodeHighlight.ambiguousCharacters": false,
    "editor.unicodeHighlight.invisibleCharacters": false
}

不公开内容

如果不想将特定目录或文件排除在公开状态之外,可以使用如下手段:

  1. 在特定文件的front matter中设定drafttrue
  2. listing中排除特定文件或文件夹
  3. 将文件或文件夹直接存放在listing不监控的其他地方
  4. 文件起名时,使用_作为开头