More robust CRAN/Bioconductor package sidebar linking
Perhaps a "fringe issue". In cran_link URLs are hardcoded. If these cannot be resolved, for whatever reason, the code fail.
You can reproduce the error by pointing to non-resolvable host.
We currently hit this as our company's corporate filter currently blocks "cloud.r-project.org". While we hopefully wait for a whitelisting, my initial thought was to use "cran.r-project.org" (which is not blocked).
Our current workarounds with disabling internet or the sidebar has undesired additional effects.
Do you consider this an issue at all?
If so, would you be willing to consider one or more of the following fixes
- Allowing users (e.g. via option
pkgdown.cran_mirrorand similar) to specific alternative mirrors? So that the canonicalhttps://cran.r-project.org/package=foocould be used. - Make more robust checks on R errors as well and not only http errors.
- Option to disable "
cran_linking" in the sidebar entirely.
Or others solutions?
This is also a problem for me right now, since r-project.org is down at the moment. I'd like to use the https://cran.rstudio.com/ mirror, but there's no way to do so--the only workaround is to disable cran linking entirely (undesirable). I think option 1 you suggest, allowing the cran mirror to be configured, would be a reasonable solution.
Also @AEBilgrau you can actually disable cran linking entirely with options(pkgdown.internet = FALSE)
@dvg-p4 It's quite some time since I looked at it, but I (think I) remember that toggling that option disabled some other things as well that depends on internet connectivity.
Thanks for filing this issue! Unfortunately, I think given the other demands for pkgdown features and the relatively limited impact of this one, it's unlikely we will ever implement it. Even though I'm closing this issue, I really appreciate the feedback, and hope you'll continue to contribute in the future 😄
Hi @hadley @AEBilgrau , we are using pkgdown::build_site command to publish documentation of some internal packages which are not on CRAN and are facing the same issue. ChatGPT suggested to have following structure in _pkgdown.yml file so as to not have any links in the documentation but that didn't help.
home:
sidebar:
structure: [license, authors]
How do we fix it, any ideas?