Many times in documentation there is a lot to say, but you do not want to overwhelm the user.

To solve this we can use folding blocks in the documentation (which are then rendered into pkgdown website automatically)

To enable this feature add Roxygen: list(markdown = TRUE) to the DESCRIPTION file before rendering the roxygen2

You can use this feature by wrapping documentation with the macros

\foldstart{[SUMMARY TEXT]}

#' DOCUMENTATION
#' ...
#' DOCUMENTATION

\foldend

The SUMMARY_TEXT is optional, where the folded block will have a header of your text.

The default will display details.

These folded blocks can be inserted anywhere in the documentation, eg @description, @param, @details, @return, ….