Create a pkgdown site inside your package

Create a pkgdown site inside your package

Create the pkgdown

Use build_pkgdown with default option to build the {pkgdown} site and copy it in “inst” so that it is available in your package.

  • You can use your own “_pkgdown.yml” with parameter yml
  • You can use your own favicon with parameter favicon
papillon::build_pkgdown(
  move = TRUE, clean_before = TRUE
)

Help user find the site

Function open_pkgdown_function() adds function open_pkgdown() inside your package that will open the userguide on demand.

papillon::open_pkgdown_function()

Users of your package (pkg) can now have access to the site using:

pkg::open_pkgdown()

Add these in your documentation and/or add a message when loading the package with this function inside your package:

#' @title .onAttach
#' @noRd
.onAttach <- function(libname, pkgname) {
  message("Open the HTML documentation with deeptools::open_pkgdown()")
}