Keep_md: true not working


#1

Hello, I have an RMarkdown file for which I would like to preserve both the html and the .md output. My YAML looks like this: Knitting works fine but there is only html output at the end. Any suggestions on how to get the .md? thank you very much!

title: "blah"
subtitle: "blah blah"
author: "me"
date: '`r Sys.Date()`'
fig_width: 6 
fig_height: 4 
output: 
  html_document:
  keep_md: true

#2

Try to indent keep_md with a tab. This piece will work:

title: "blah"
subtitle: "blah blah"
author: "me"
date: '`r Sys.Date()`'
fig_width: 6 
fig_height: 4 
output: 
  html_document:
    keep_md: true

#3

Great – thank you – that fixed it. The only issue was the missing indentation.


#4

Yeah, YAML is whitespace-sensitive, so you have to be careful with that.

Nice little stash of YAML frontmatter as a gist by Jenny Bryan: