Rmarkdowns on BitBucket

rmarkdown

#1

Did some searching but nothing turned up. Has anyone in an organization that uses Bitbucket been able to get Rmarkdowns to render nicely like they do in Github? I'd love for the Rmarkdown files we have in Bitbucket show up like this: https://github.com/tidyverse/dplyr/blob/master/vignettes/compatibility.Rmd


#2

There's nothing special from the RMarkdown end of things that makes the rendering happen. GitHub renders markdown (it's even nicer in .md format, which is why you'll see a lot of README.Rmd rendered to README.md) with "GitHub flavored markdown" (you'll see it abbreviated as gfm).

I don't use BitBucket, but it looks like it supports markdown rendering. One option would be to output to .md. For example, if I'm setting up the YAML for an html file, but want to keep the markdown, I'd do this (see the R Markdown "Keeping Markdown" section for details):

---
title: "My document"
output:
  html_document:
    keep_md: true
---

Note that YAML is whitespace sensitive, so make sure to match the indents correctly!

Hope this helps.


#3

@mara thank you, that's helpful. I was hoping to not have to go through the extra step of converting a .Rmd to .md and and have it still render like a normal .md file on Bitbucket (since Github allows for this). But converting to .md seems like the best option right now.


#4

Yeah, the Rmd on GitHub isn't actually as good as the md (figures, etc. don't show up in the Rmd), and adding the keep_md to the YAML is easy enough! :slightly_smiling_face: