Skip to content

pkgdown 1.4.0

Compare
Choose a tag to compare
@hadley hadley released this 03 Sep 18:15

New features

  • build_site(), build_reference() and build_home() gain a parameter
    devel which controls whether you're in deployment or development mode.
    It generalises and replaces (with deprecation) the existing document
    argument.

    Development mode is optimised for rapid iteration and is the default
    for build_reference(). It uses pkgload::load_all() to load code
    directly from disk in order.

    Deployment mode is slower, but guarantees correct results, and is the
    default for build_site(). It installs the package into a temporary
    library, and runs examples/articles in a new process.

  • build_reference() no longer runs devtools::document() (#1079) and
    build_home() no longer re-builds README.Rmd. This makes the scope
    of responsibility of pkgdown more clear: it now only creates/modifies
    files in doc/.

  • build_home() now strips quotes from Title and Description fields
    when generating page metadata. Additionally, you can now override the
    defaults via the title and description fields in the home section of
    _pkgdown.yml (#957, @maelle).

  • vignette("linking") describes how pkgdown's automatic linking works, and
    how to ensure that cross-package links point to the right place.

Bug fixes and minor improvements

Rd translation

  • \examples{} rendering has been completely overhauled so it now first
    converts the entire mixed Rd-R block to R prior, and then evaluates the
    whole thing. This considerably improves the fidelity of the translation
    at a small cost of no longer being able to remove \donttest{} and
    friends (#1087).

  • \item{}s in \describe{} containing whitespace are translated correctly
    (#1117).

  • \dots and \ldots are translated to ... instead of the ellipsis,
    since they're often found in code (#1114).

  • \tabular{} translation handles code better (@mitchelloharawild, #978).

  • \subsection{} contents are now treated as paragraphs, not inline text
    (#991).

  • \preformatted{} blocks preserve important whitespace (#951).

Front end

  • Links to online documentation for functions in code chunks are no longer
    displayed when printing (#1135, @Bisaloo).

  • Updated fontawesome to v5.7.1. fontawesome 5 deprecated the fa prefix.
    If you have used custom icons in your navbar, you'll should update them from
    (e.g.) fa fa-home to fas fa-home. Brands now have a separate prefix so
    fa fa-github becomes fab fa-github (#953).

  • The navbar is now automatically hidden with
    headroom.js.

  • The sticky behaviour of the navbar is now implemented in pure CSS instead of
    relying a the 3rd party javascript library (#1016, @Bisaloo)

  • Favicons are now automatically built from a package logo (#949).

Linking

  • Infix operators (e.g., %in% and %*%) are now linked to their
    documentation (#1082).

  • Function names can now be included in headers without spurious auto-linking
    (#948).

  • Links to external documentation now point to rdrr.io
    (#998).

Other

  • News page recognises more version specfications (including the
    "(development version)" now used by usethis) (#980).

  • Subdirectories are supported for assets (#939, @ijlyttle).

  • A default 404 page (404.html) is built, unless a custom .github/404.md
    is provided (#947).

  • build_article() now uses the raw vignette title as page <title>
    and og:title (@maelle, #1037).

  • build_home() now looks for license files spelled either as LICENSE or
    LICENCE (#972).

  • build_home() can find badges in paragraph coming after the comment
    <!-- badges: start --> (#670, @gaborcsardi, @maelle).

  • build_home() will add a community section to the sidebar if there is either
    a code of conduct (.github/CODE_OF_CONDUCT.md) or a contributing guide
    (.github/CONTRIBUTING.md) (#1044, @maelle).

  • build_reference() gains a topics argument which allows you to re-build
    only specified topics.

  • build_site(new_process = TRUE) gains a timeout,
    options(pkgdown.timeout = 10), that can be used to prevent stalled
    builds.

  • deploy_site_github(install = FALSE) makes it possible to opt out of
    installation.

  • dev_mode() now recognises 0.1.9000 as a development version of a package
    (this is an emerging standard we use for packages with backward incompatible
    changes) (#1101).