Written by Yihui Xie, the package author, blogdown: Creating Websites with R Markdown introduces the R package and how to use it. The book is published by Chapman & Hall/CRC, and you can read it online for free.
The book is structured into 5 parts to guide the reader into the use of the R package blogdown to create and manage websites:
# run this to update the content below xfun::pkg_attach2("xml2") html <- read_html("https://bookdown.org/yihui/blogdown/") chapters <- xml_find_all(html, "//li[@class='chapter']") first_level <- chapters[which(purrr::map_lgl(xml_attr(chapters, 'data-level'), ~ grepl('^\\d+$', .x)))] titles <- xml_text(xml_find_all(first_level, "a")) titles <- gsub("^(\\d+)", "\\1.", titles) titles <- gsub("^(.*) \\([*])$", "\\1", titles) url <- file.path("https://bookdown.org/yihui/blogdown", xml_attr(first_level, "data-path")) formatted <- sprintf("* [%s](%s)", titles, url) cat(formatted, sep = "\n")
A note from the authors: Some of the information and instructions in this book are now out of date because of changes to Hugo and the recent blogdown package. Most of the book is still valid but some chapters may have less accurate informations
If you are new to R Markdown, we recommend you start with R Markdown: The Definitive Guide to get an overview. Part I introduces how to install the relevant packages, and provides an overview of R Markdown, including the possible output formats, the Markdown syntax, the R code chunk syntax, and how to use other languages in R Markdown.
Next, the chapter on Websites will help orient you to how the blogdown package allows you to use R Markdown to create websites.
Look at the Examples page.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.