I am a little confused as to why there are multiple possible locations for "vignettes" in an R package. I don't understand which locations are used for what and when. For example:
devtools::use_vignettes()
creates a vignettes folder under the root of the package
devtools::build_vignettes()
creates a inst/doc folder that gets promoted to the root at build
pkgdown::build_site()
creates a docs folder.
As background:I have read H.Wickhams R packages book and I have created several packages using the first option and all things have behaved well. I would have users install from github using:
devtools::install_github(pkg,build_vignettes=TRUE)
Now, I have just started to contribute in the joint development of a package in which the first and third option have been used. I have noticed that the .rmd file in the vignettes folder is the same as the index.html file in the docs folder. Does pkgdown copy from the vignettes folder?
Also for this package when i install from github (with build_vignettes=TRUE) i get an error saying installation failed because the doc/index.html path couldn't be found. Now why would that happen?