使用bootstrap_document函数作为输出类型时,是否可以包含其他HTML内容或定义公共lib_dir
?即
---
output:
knitrBootstrap::bootstrap_document:
title: "Test file"
theme: amelia
highlight: sunburst
theme.chooser: TRUE
highlight.chooser: TRUE
includes:
in_header: header.html
before_body: doc_prefix.html
after_body: doc_suffix.html
---
我试图使用bootstrap样式的HTML报告创建一个完整的R Markdown website。
这是我得到的错误
unused argument (includes = list(in_header = "include/in_header.html", before_body = "include/before_body.html", after_body = "include/after_body.html"))
Calls: <Anonymous> -> create_output_format -> do.call -> <Anonymous>
Execution halted
答案 0 :(得分:1)
使用上述选项的组合可以使用R Markdown创建完整的网站。要创建网站,您需要:
例如,这是一个网站可能的_output.yaml文件:
---
html_document:
self_contained: false
lib_dir: libs
includes:
in_header: include/in_header.html
before_body: include/before_body.html
after_body: include/after_body.html
---