Back to rankings

Create Blogs and Websites with R Markdown

hugoblogdownrstudiormarkdownrblog-enginewebsite-generation
Star Growth
Stars
1.8k
Forks
326
Weekly Growth
Issues
24
5001k1.5k
Nov 2016Jan 2020Apr 2023Jul 2026
README

blogdown

R-CMD-check CRAN status Codecov test coverage

The goal of the blogdown package is to provide a powerful and customizable website output format for R Markdown. Use dynamic R Markdown documents to build webpages featuring:

  • R code (or other programming languages that knitr supports),

  • automatically rendered output such as graphics, tables, analysis results, and HTML widgets, and

  • technical writing elements such as citations, footnotes, and LaTeX math, enabled by the bookdown package.

By default, blogdown uses Hugo, a popular open-source static website generator, which provides a fast and flexible way to build your site content to be shared online. Other website generators like Jekyll and Hexo are also supported.

A useful feature of blogdown sites, compared to other R Markdown-based websites, is that you may organize your website content (including R Markdown files) within subdirectories. This makes blogdown a good solution not just for blogging or sites about R — it can also be used to create general-purpose websites to communicate about data science, statistics, data visualization, programming, or education.

Book

blogdown: Creating Websites with R Markdown

Installation

You can install the package via CRAN as follows:

install.packages('blogdown')

If you want to use the development version of the blogdown package, you can install the package from GitHub via the remotes package:

remotes::install_github('rstudio/blogdown')

Usage

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 https://themes.gohugo.io. 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.

Getting help

There are two main places to get help:

  1. The RStudio community is a friendly place to ask any questions about blogdown. Be sure to use the blogdown tag.

  2. Stack Overflow is a great source of answers to common blogdown questions. Use the tags [r][blogdown] if you ask a question.

Code of Conduct

Please note that the blogdown project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Related repositories
gohugoio/hugo

The world’s fastest framework for building websites.

GoGo ModulesApache License 2.0gohugo
gohugo.io
89k8.3k
adityatelange/hugo-PaperMod

A fast, clean, responsive Hugo theme.

HTMLMIT Licensefastclean
adityatelange.github.io/hugo-PaperMod/
13.8k3.4k
HugoBlox/kit

🧱 Describe your site, AI builds it, you own it as Markdown. Snap together Tailwind blocks like Lego — landing pages, blogs, portfolios, docs & more. No AI slop. Free to deploy anywhere 👇

HTMLMIT Licensehugoacademic
hugoblox.com
9.6k2.9k
themesberg/flowbite

Open-source UI component library and front-end development framework based on Tailwind CSS

HTMLMIT Licensecsshtml
flowbite.com
9.3k872
HugoBlox/hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!

HTMLMIT Licensehugoacademic
hugoblox.com/templates/
8.5k2.9k
CaiJimmy/hugo-theme-stack

Card-style Hugo theme designed for bloggers

HTMLGNU General Public License v3.0hugo-themehugo
stack.cai.im
6.4k2k
peaceiris/actions-gh-pages

GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.

TypeScriptnpmMIT Licensegithub-actionsgithub-pages
github.com/marketplace/actions/github-pages-action
5.3k451
HugoBlox/hugo-theme-academic-cv

🎓 Academic portfolio that boosts citations. AI generates pages, you own as Markdown. BibTeX auto-import, Jupyter, LaTeX, slides, visual block editor — free to host forever. 学术主页,AI 生成,Markdown 拥有 👇

Jupyter NotebookMIT Licensehugowebsite-generation
hugoblox.com/templates/academic-cv
5k6.5k
HugoBlox/theme-academic-cv

🎓 无需编写任何代码即可轻松创建漂亮的学术网站 Easily create a beautiful academic résumé or educational website using Hugo and GitHub. No code.

TeXMIT Licensehugowebsite-generation
hugoblox.com/templates/
4.2k6.4k
alex-shpak/hugo-book

Hugo documentation theme as simple as plain book

HTMLMIT Licensehugohugo-theme
book.alxs.dev
4.1k1.3k
dillonzq/LoveIt

❤️A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题

JavaScriptnpmMIT Licensehugohugo-theme
hugoloveit.com
3.9k1.2k
hunvreus/pagescms

The simplest CMS you'll ever need. Manage content and media right in your GitHub repository.

TypeScriptnpmMIT License11tyastro
pagescms.org
3.8k508