blogdown v0.13


Monthly downloads



Create Blogs and Websites with R Markdown

Write blog posts and web pages in R Markdown. This package supports the static site generator 'Hugo' (<>) best, and it also supports 'Jekyll' (<>) and 'Hexo' (<>).



Build Status Coverage status Downloads from the RStudio CRAN mirror

blogdown logo

An open-source (GPL-3) R package to generate static websites based on R Markdown and Hugo. You can install the package via CRAN or GitHub:

## Install from CRAN

## Or, install from GitHub

You may create a new site via the function blogdown::new_site() under an empty directory. It will create a skeleton site, download a Hugo theme from Github, add some sample content, launch a web browser and you will see the new site. The sample blog post hello-world.Rmd should be opened automatically, and you can edit it. The website will be automatically rebuilt and the page will be refreshed after you save the file.

If you use RStudio, you can create a new RStudio project for your website from the menu File -> New Project -> New Directory -> Website using blogdown.

The function blogdown::serve_site() may be the most frequently used function in this package. It builds the website, loads it into your web browser, and automatically refreshes the browser when you update the Markdown or R Markdown files. Do not use the command line hugo server to build or serve the site. It only understands plain Markdown files, and cannot build R Markdown.

You may not be satisfied with the default site created from new_site(). There are two things you may want to do after your first successful experiment with blogdown:

  1. Pick a Hugo theme that you like from All you need is its Github user and repository name, to be passed to the theme argument of new_site().
  2. Add more content (pages or posts), or migrate your existing website.

The full documentation is the blogdown book freely available at You are expected to read at least the first chapter. You are welcome to send us feedback using Github issues or ask questions on StackOverflow with the blogdown tag.

Functions in blogdown

Name Description
shortcode Helper functions to write Hugo shortcodes using the R syntax
html_page An R Markdown output format for blogdown web pages
dep_path A helper function to return a dependency path name
install_theme Install a Hugo theme from Github
blogdown The blogdown package
build_dir Build all Rmd files under a directory
serve_site Live preview a site
hugo_cmd Run Hugo commands
build_site Build a website
find_yaml Find posts containing the specified metadata
install_hugo Install Hugo
No Results!

Last month downloads


Type Package
License GPL-3
LazyData true
SystemRequirements Hugo () and Pandoc ()
RoxygenNote 6.1.1
Encoding UTF-8
NeedsCompilation no
Packaged 2019-06-11 18:20:02 UTC; yihui
Repository CRAN
Date/Publication 2019-06-11 19:10:03 UTC

Include our badge in your README