I am trying to compile a package vignette such that an .md file remains in the vignette folder so that it is still visible on github. I am using devtools
for all of this. I have looked at this approach and will outline it below:
I have auto-generated a vignette template use devtools::use_vignette()
. Then I have modified the .Rmd
file to look like this (truncated template version):
---
title: "package"
author: "author"
date: "`r Sys.Date()`"
output:
rmarkdown::html_vignette:
toc: true
keep_md: true
vignette: >
%\VignetteIndexEntry{Vignette Title}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
Vignettes are long form documentation commonly included in packages. Because they are part of the distribution of the package, they need to be as compact as possible. The `html_vignette` output type provides a custom style sheet (and tweaks some options) to ensure that the resulting html is as small as possible. The `html_vignette` format:
- Never uses retina figures
- Has a smaller default figure size
- Uses a custom CSS stylesheet instead of the default Twitter Bootstrap style
## Vignette Info
Note the various macros within the `vignette` section of the metadata block above. These are required in order to instruct R how to build the vignette. Note that you should change the `title` field and the `\VignetteIndexEntry` to match the title of your vignette.
So the .yaml
is modified but when I compile using devtools::build_vignettes()
it does not seem to leave a .md
file in the vignettes directory. No error message and the vignette builds fine so this is a little confusing.
So to summarize the question, do anyone know how to compile a vignette using devtools::build_vignette
such that the basic markdown file is kept in the vignettes directory?