删除 R、Rmarkdown 中“bookdown”中的 facebook 和 twitter 链接

remove facebook and twitter links in `bookdown` in R, Rmarkdown

我正在使用 R 中的 bookdown 包编写一个 gitbook,但我不希望最终的书有 facebook、twitter 的共享链接。我在 YAML

中使用类似的东西
--- 
title: "A Minimal Book Example"
author: "SN"
date: "`r Sys.Date()`"
output: 
  bookdown::gitbook
    gitbook_config:
      sharing:
        facebook: false
        twitter: false
documentclass: book
link-citations: yes
description: "This book ... ."
---

但我遇到了错误

Error in yaml::yaml.load(enc2utf8(string), ...) : 
  Scanner error: mapping values are not allowed in this context at line 6, column 19
Calls: <Anonymous> ... yaml_load_utf8 -> mark_utf8 -> <Anonymous> -> .Call
Execution halted

谁能帮我设置 YAML 中的选项,以便在最终渲染中不显示共享选项?

谢谢! 序列号

两个错误:

  1. 您在 bookdown::gitbook;
  2. 之后省略了一个冒号
  3. gitbook_config 应该是 config.
--- 
title: "A Minimal Book Example"
author: "SN"
date: "`r Sys.Date()`"
output: 
  bookdown::gitbook:
    config:
      sharing:
        facebook: false
        twitter: false
documentclass: book
link-citations: yes
description: "This book ... ."
---