Open renozao opened 2 weeks ago
The issue:
vignettes/
a_file.Rmd
knitr::include_graphics("../man/figures/vignettes/a/b/c/image.png")
man/figures/vignettes/a/b/c/image.png
When building the site, I get the warning:
Missing images in vignettes/a_file.Rmd: ../reference/figures/articles/a/b/c/image.png ℹ pkgdown can only use images in man/figures and vignettes
../reference/figures/articles/a/b/c/image.png
../reference/figures/vignettes/a/b/c/image.png
The cause:
Hence, it looks like there is some string substitution happening, which replaces "vignettes" by "articles", which in this case is incorrect or at least not consistent with where the image files are copied to. I believe this happens here: https://github.com/r-lib/pkgdown/blob/ffe60d5f60934e95285d416dae12c05e24ed1dac/R/tweak-tags.R#L93
"vignettes"
"articles"
The issue:
vignettes/
: an filea_file.Rmd
, with a chunk that includes a static imageman/figures/vignettes/a/b/c/image.png
When building the site, I get the warning:
../reference/figures/articles/a/b/c/image.png
../reference/figures/vignettes/a/b/c/image.png
The cause:
Hence, it looks like there is some string substitution happening, which replaces
"vignettes"
by"articles"
, which in this case is incorrect or at least not consistent with where the image files are copied to. I believe this happens here: https://github.com/r-lib/pkgdown/blob/ffe60d5f60934e95285d416dae12c05e24ed1dac/R/tweak-tags.R#L93