# dev_doc.R
# Generate README in _doc automatically for package cargo.
# Packages ---------------------------------------------------------------------
library(rmarkdown)
# Generate new README in _doc --------------------------------------------------
# The README is a CommonMark version of the RMarkdown vignette
# "A primer to package cargo". The HEADER.md file in vignettes/ is included
# before the body so that the generated README file has a proper Markdown title.
rmarkdown::render(
input = file.path("vignettes", "cargo_primer.Rmd"),
output_format = rmarkdown::md_document(
variant = "commonmark",
includes = rmarkdown::includes(
before_body = "HEADER.md"
)
),
output_file = "README.md",
output_dir = "_doc"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.