Open kevinushey opened 8 years ago
I'm a little leery of putting the user library's absolute path in the html output, if the latter may be published somewhere. Can this be constrained to cases where we know the output isn't going anywhere?
Sorry, I should have been more clear -- all I'm advocating for is the inclusion of the data-*
attributes, which should be easy to draw from the dependency information already passed into renderDependencies()
. (The src
field would just be whatever is normally passed in)
That said, this isn't high priority (there's a chance it may be useful in the R notebook work later on, but I don't think we'll need it for now)
Actually I wished the dependency object had a package
attribute, and src
could be resolved at a later time using system.file(src, package = package)
(if the package
name is provided). This will hide the absolute path, and make the dependencies more portable since they will be independent of the R library path.
I agree. I think this could be pretty seamlessly added (if there is a
package
attribute then src
can be relative to the package).
On Fri, Apr 29, 2016 at 12:42 AM, Yihui Xie notifications@github.com wrote:
Actually I wished the dependency object had a package attribute, and src could be resolved at a later time using system.file(src, package = package) (if the package name is provided). This will hide the absolute path, and make the dependencies more portable since they will be independent of the R library path.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/rstudio/htmltools/issues/59#issuecomment-215625110
It would be useful if
renderDependencies()
annotated the injected<script>
/<link>
tags with data attributes describing the source of each dependency, e.g.This would make it possible to recover the source of a dependency after e.g.
rmarkdown::render()
is done with the document.