Editing your site

RStudio & RMarkdown Guide

Publish content from RStudio with RMarkdown. Recommended: render to Markdown directly (without blogdown); fallback: blogdown only if necessary.

R users can publish to Ownable with RMarkdown in RStudio. The recommended path is to render .Rmd to plain Markdown and let Hugo handle the site. Blogdown is a fallback only if you must.

  • Install rmarkdown:
    install.packages("rmarkdown")
  • Add to your .Rmd frontmatter (or set in the rmarkdown::render call):
    output: md_document
  • Render your file:
    rmarkdown::render("input.Rmd", rmarkdown::md_document())
  • Place the generated .md in your Hugo content (e.g., content/blog/my-analysis/index.md with images in the same folder or assets/media).
  • Run your usual Hugo workflow (hugo server via the CLI or the Visual Builder).

Commit both the source .Rmd and the generated .md so teammates can rebuild if needed.

Why avoid blogdown by default?

  • Compatibility: blogdown has lagged modern Hugo features and can corrupt config paths (e.g., config/_default) and Hugo Modules.
  • Extra complexity: adds another build step and can mask Hugo errors.
  • Ownership: blogdown competes with Hugo for the HTML rendering pipeline; keeping Hugo in control prevents double-processing and keeps your site output consistent and debuggable.
  1. Install blogdown (latest)

    remotes::install_github("rstudio/blogdown")
  2. Open your site Open the project in RStudio; expect blogdown to flatten config/_default into project root (a known limitation).

  3. Create content

    blogdown::new_post(title = "My Analysis", ext = ".Rmd")
  4. Serve Use Addins → Serve Site (runs blogdown:::serve_site()).

If you hit build issues, convert to plain Markdown with md_document and return to the recommended path above.

Tips

  • Prefer .Rmarkdown over .Rmd if you want Hugo to own the HTML rendering.
  • Keep image paths relative and web-safe; store in page bundles or assets/media.
  • Avoid the dated embedded RStudio browser for previews; use a real browser on the hugo server URL.

Was this page helpful?

From the makers of

© 2026 Lore Labs.

On this page