render_rmd: Hugo-ify an R Markdown document

View source: R/render.R

render_rmdR Documentation

Hugo-ify an R Markdown document

Description

Hugo is largely used to convert plain markdown files into HTML, but it also supports HTML documents as input files. render_rmd() renders Rmd files using rmarkdown::html_document() and the converts the HTML to work with Hugo.

By default render_rmd() will read the YAML front-matter of an Rmd for a section parameter and use that as a sub-directory of the content folder as the output location.

Usage

render_rmd(rmd_file, tmp_dir = tempdir(), out_dir = NULL, quiet = TRUE)

Arguments

rmd_file

the .rmd file to convert

tmp_dir

a temporary directory for processing

out_dir

override the default output directory

quiet

keep knitr quiet, defaults to TRUE, set to FALSE to see knitr messages


co-analysis/govuk-hugo-r documentation built on June 23, 2022, 5:44 a.m.