Thanks so much for this suggestion! I was not aware that I could knit to multiple formats at once, and I didn't even think to look into that.
I've now done some googling, and it seems like I should indeed be able to knit to both "html_document" and "github_document" at the same time, but I can't quite get there. Your suggestion seems to bypass the "knit" button by directly using the rmarkdown::render() function, and I'd like to be able to use the button.
I got most of the way there by following the suggestion shown here, but for some reason the html file is not knitting correctly. I get a nice .md file without the YAML at the top, but no .html. Any idea why?
This is my YAML:
output:
html_document: default
github_document: default
knit: (function(inputFile, encoding) {
rmarkdown::render(inputFile, encoding = encoding,
output_format = c("html_document", "github_document")) })
The knitting works well, but no html document is produced.