-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paths to images produced by magick gets absolute paths #2334
Comments
I think this is a problem either with Ah the problem is that it's not an absolute path here, but a weird relative path: |
Interestingly if I set |
Works around yihui/knitr#2171 Fixes #2334. Fixes #2341.
Works around yihui/knitr#2171 Fixes r-lib#2334. Fixes r-lib#2341.
This seem related to #1027, but to be honest I'm not entirely sure where the issue is.
I have an article in a package with a pkgdown site. When I call
pkgdown::build_site()
the images are shown correctly in the rendered html, but when inspecting the images I can see that the path are absolute. In contrast the plots produced using base plot (or ggplot2) have the correct, relative paths. When the pkgdown site is shown in its final location the magick images are then missing because the png can't be found.Not sure how to produce a proper reprex for this as it involves building the site. To create the content below I started a new project in RStudio as a package and called:
usethis::use_pkgdown()
usethis::use_article("imgpathdebug")
pkgdown::build_site()
Below is a minimal rmd (the content of the "imgpathdebug" article mentioned in 2) ) which when rendered via
pkgdown::build_site()
will produce the two different paths shown in the screen shot below:Session info
Is there a way to fix this?
The text was updated successfully, but these errors were encountered: