Feature request: "run_dont_run" equivalent in _pkgdown.yaml
Hello, thanks for building such a transformative package. I have a small feature request that would make a big workflow difference. Would it be possible to include an option for the run_dont_run parameter in the yaml file?
My use case is running a package where I will always want pkgdown::build_site(run_dont_run = TRUE). For a package that hits an API, this feature is very helpful to get examples built on the documentation website even when they're not run on CRAN checks. It would be incredibly helpful if that could be something I could permanently set in the yaml rather than specifying it on each build.
Sorry if this is already possible, I've searched all over and tried various ways of including this with no luck.
I think you're right that run_dont_run can't be specified from the YAML. As a workaround, I'd just write a small function to call pkgdown::build_site with the args you want, e.g.
build_rdr <- function() pkgdown::build_site(run_dont_run = TRUE)
You could put that in a small package of utilities for your own use (and put other things there to simplify other common operations), or even put it in the package you're producing (but that will create a dependency on pkgdown, which you might not want).
Thanks for the suggestion.
Hello - reupping this old issue to see if there might be any new ways to specify run_dont_run as a default setting for a pkgdown build? Or if it might be added in a future version?
@hrecht coming back to this issue, I'd now suggest that you don't use \dontrun{} and instead use one of the techniques suggested in https://r-pkgs.org/man.html#sec-man-examples-dependencies-conditional-execution
Thanks, I actually did switch to examplesIf after commenting here and it's working great! Thanks for the great package book.