I am compiling a vignette for my R package and I want to preserve the .md output too. I believe I should be able to do this with keep_md: TRUE
, but this doesn't appear to work. MWE below, which doesn't produce a .md file when I run devtools::build_vignettes()
.
The vignette:
---
title: "mwe"
output:
rmarkdown::html_vignette:
keep_md: TRUE
vignette: >
%\VignetteIndexEntry{mwe}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
```{r setup}
library(foo)
print("This is my vignette. I want to keep the .md file.")
```
Resulting file structure (i.e. no .md file):
.
├── .Rbuildignore
├── .gitignore
├── DESCRIPTION
├── Meta
│ └── vignette.rds
├── NAMESPACE
├── R
├── doc
│ ├── mwe.R
│ ├── mwe.Rmd
│ └── mwe.html
└── vignettes
├── .gitignore
└── mwe.Rmd
Am I specifying the keep_md
option correctly?