Open cderv opened 1 month ago
From @mcanouil there
The error does not come from Quarto. It's from
htmltools::copyDependencyToDir
.This function is used inside Quarto using the default, which is
mustWork = TRUE
.If
TRUE
anddependency
does not point to a directory on disk (but rather a URL location), an error is raised. IfFALSE
then non-disk dependencies are returned without modification.So right now, Quarto does not allow dependencies to be URL.
It's possible to change this behaviour, but it's not simply changing
mustWork = TRUE
tomustWork = FALSE
.
Can you explain a bit more what this is trying to do?
General idea is that in knitr context, some R package can brings HTML dependencies, usually JS/CSS. htmltools package have the logic behind, and knitr knows what to do with the found dependencies. htmlwidgets R package leverages the htmltools.
htmltools::htmlDependency()
is the function allowing to set this required dependencies. If you look at the doc, the src
can be local files, or a url. For files dependency, we need to copy them in the right place from the package to the project usually. htmltools::copyDependencyToDir()
does that.
html_dependencies_as_string
is building the dependency string that should be including in the resulting document. This is inspired from the one in R Markdown I believe
https://github.com/rstudio/rmarkdown/blob/a9497ffa903e124a20e455e9702635ff135d9e9d/R/html_dependencies.R#L316-L324
The R Markdown version does set mustWork = FALSE
which prevent the error, but it may also do specific handling in that case. This is what I need to check.
Are there any updates for this?
@roxannecorbeil All relevant information has been communicated regarding the issue. If there are no updates here, it means there’s nothing new to report.
Discussed in https://github.com/quarto-dev/quarto-cli/discussions/10325