r-lib / pkgdown

Generate static html documentation for an R package
https://pkgdown.r-lib.org/
Other
721 stars 336 forks source link

String "vignettes" in path to static images get replaced by "articles" #2810

Open renozao opened 2 weeks ago

renozao commented 2 weeks ago

The issue:

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

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