add_yaml: Add rmarkdown YAML front-matter to markdown doc

Description Usage Arguments Details Value

Description

Add rmarkdown YAML front-matter to markdown doc

Usage

1
2
add_yaml(doc, theme = "default", styles = list(), shiny = FALSE,
  yml = NULL)

Arguments

doc

The markdown document to append to YAML

theme

A Bootswatch theme (see http://bootswatch.com) ["default"]

styles

List of paths to one or more CSS style sheets

shiny

Whether to use the Shiny runtime [FALSE]

yml

Optional user-supplied YAML frontmatter [NULL]

Details

Rmarkdown documents take a YAML header to describe output options. This function adds the basic header:

1
2
3
4
5
6
7
---
output:
  html_document:
    toc: true
    toc_float: true
    css: [path/to/css1, path/to/css2]
---

Users may supply any CSS they wish; an example is provided with use_example_css (and write with write_example_css. Users may supply their own YAML header, but must #' correctly specify the (absolute) path to the CSS file.

Value

An Rmarkdown version of doc with a YAML header


jacob-ogre/gdoc2rmd documentation built on May 18, 2019, 8:01 a.m.