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

SN2*_*248 3 r knitr bookdown

我正在使用bookdownR 中的包编写 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 ... ."
---
Run Code Online (Sandbox Code Playgroud)

但我收到错误

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
Run Code Online (Sandbox Code Playgroud)

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

谢谢!序列号

Yih*_*Xie 5

两个错误:

  1. bookdown::gitbook您在;之后省略了冒号
  2. 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 ... ."
---
Run Code Online (Sandbox Code Playgroud)