Render xaringan or Quarto slides as an html file. In generally, it is the
same thing as rmarkdown::render()
or quarto::quarto_render()
except that
the self_contained
option is forced to TRUE
if the HTML file is built
into a directory other than the one containing from
.
Arguments
- from
Path to an
.Rmd
or.qmd
file.- to
The name of the output file. If using
NULL
then the output file name will be based on file name for thefrom
file. If a file name is provided, a path to the output file can also be provided.- self_contained
Should the output file be a self-contained HTML file where all images, CSS and JavaScript are included directly in the output file? This option, when
TRUE
, provides you with a single HTML file that you can share with others, but it may be very large. This feature is enabled by default when theto
file is written in a directory other than the one containing thefrom
R Markdown file.- render_args
A list of arguments passed to
rmarkdown::render()
orquarto::quarto_render()
.
Examples
with_example("slides.Rmd", {
# Render html from Rmd file
to_html("slides.Rmd")
})
#> ℹ Rendering slides.Rmd into slides.html
#> ✔ Rendering slides.Rmd into slides.html ... done
#>