pkgdown will automatically link to documentation and articleswherever it’s possible to do unambiguously. This includes:
build_site().?, like?build_site orpackage?pkgdown.help(), likehelp("pkgdown").vignette(), likevignette("pkgdown").Linking to documentation in another package is straightforward. Justadapt the call in the usual way:
purrr::map(),MASS::addterm().?purrr::map,?MASS::addterm.vignette("other-langs", package = "purrr"),vignette("longintro", package = "rpart"){purrr}If pkgdown can find a pkgdown site for the remote package, it willlink to it; otherwise, it will link tohttps://rdrr.io/ for documentation and CRAN forvignettes. In order for a pkgdown site to be findable, it needs to belisted in two places:
In theURL field in theDESCRIPTION, asindplyr:
URL: https://dplyr.tidyverse.org, https://github.com/tidyverse/dplyrIn theurl field in_pkgdown.yml, as indplyr
When this field is defined, pkgdown generates a public facingpkgdown.ymlfile that provides metadata about the site:
pandoc:'2.2'pkgdown:1.3.0pkgdown_sha:~articles:compatibility: compatibility.htmldplyr: dplyr.htmldplyr_0.8.0: future/dplyr_0.8.0.htmldplyr_0.8.0_new_hybrid: future/dplyr_0.8.0_new_hybrid.htmlprogramming: programming.htmltwo-table: two-table.htmlwindow-functions: window-functions.htmlurls:reference: https://dplyr.tidyverse.org/referencearticle: https://dplyr.tidyverse.org/articlesNow, when you build a pkgdown site for a package that links to thedplyr documentation (e.g.,dplyr::mutate()), pkgdown looksfirst in dplyr’sDESCRIPTION to find its website, then itlooks forpkgdown.yml, and uses the metadata to generatethe correct links.
To allow your package to be linked by other locally installedpackages, even if your website is not reachable at build time, thefollowing option needs to be set in_pkgdown.yml:
This allows locally installed packages to access package indexmetadata from the locally installed copy, which may be useful if yourwebsite require auth, or you build behind a firewall.