pkgdown icon indicating copy to clipboard operation
pkgdown copied to clipboard

What is `.install_extras` ?

Open kevinrue opened this issue 1 year ago • 3 comments

https://github.com/r-lib/pkgdown/blob/0cb9d38d1dc25946f01ee7500be9665985d8784e/R/build-articles.R#L117

I seem to be running into a situation where this is relevant but I don't understand the mention here.

I have vignettes where the image files are stored in a subdirectory vignettes/screenshots/.

When I reference those image files in my vignette (using either plain markdown or knitr::include_graphics()) the forward slashes get replaced by %2F which in turns ruins the path and prevents those images from displaying properly.

Example: screenshots%2Fbasic-demo.png

This seems to be a consequence of updating to bootstrap 5 as it used to work until now.

kevinrue avatar Oct 06 '24 21:10 kevinrue

If I may rephrase my question / feature request: is it truly impossible to store image files in a subdirectory of vignettes/ ?

It seems a bit picky to "not allow" subdirectories, it feels more organised to separate the actual vignettes from the (potentially many) images they embed.

Many thanks in advance for advice / considering the feature request.

kevinrue avatar Oct 07 '24 08:10 kevinrue

Can you please provide a simple reprex of the problem that you're seeing?

hadley avatar Oct 07 '24 12:10 hadley

Huh.

On GitHub Pages it works

https://kevinrue.github.io/pkgdown2793/articles/pkgdown2793.html

But this is how it looks on my Apple M1 Max macos 14.6.1 (23G93) in Chrome:

image

With the web inspector telling me the image HTML is:

<img src="images%2Fcat.jpg">

kevinrue avatar Oct 07 '24 14:10 kevinrue

Have you been able to put external figures in articles of your pkgdown website? I am still struggling: #2807

wlangera avatar Apr 17 '25 10:04 wlangera

Please provide a small reproducible example of the issue you're seeing.

jayhesselberth avatar May 30 '25 11:05 jayhesselberth