RMarkdown is a popular format with statisticians, often edited within RStudio.
So how can we edit our site with RStudio?
Local development with RStudio
Open RStudio and install Blogdown:
academic.Rprojfrom your site’s folder, downloading it if necessary
Blogdown will automatically move your site’s
config/_default/config.yamlfile to the site folder as Blogdown does not fully support Hugo’s config folder
In the RStudio menu bar, choose Addins > Serve Site (clicking this button will call
- Paste the local URL which RStudio provides (e.g. http://127.0.0.1:4321) into your web browser to preview your new site
- Avoid using the integrated RStudio web browser as it can be outdated and buggy
The community recommend saving R content as Markdown with the
.Rmarkdown file extension rather than as HTML with the
Why is RMarkdown recommended? Hugo is used to convert Markdown content into an HTML website powered by a Wowchemy template and Wowchemy’s page building components. Hence, by providing Rmd’s HTML rather than processed RMarkdown as the input to Hugo and Wowchemy, you may experience conflicts as the Rmd ecosystem performs similar actions to Hugo yet has little awareness of Hugo and Wowchemy templates.