Skip to content

Releases: r-lib/pkgdown

pkgdown 2.0.9

18 Apr 21:56
Compare
Choose a tag to compare
  • Fixes for regressions in 2.0.8:

    • Output links generated when building the site work once again (#2435).

    • pkgdown once again uses Bootstrap version specified in a template
      package (@gadenbuie, #2443).

  • Front-end improvements:

    • The skip link now becomes visible when focussed (#2138). Thanks to @glin
      for the styles!

    • The left and right footers no longer contain an extra empty paragraph tag
      and the footer gains additional padding-top to keep the whitespace constant
      (#2381).

    • Clipboard buttons report their action again ("Copied!") (#2462)

  • It is now easier to preview parts of the website locally interactively.
    build_reference_index() and friends will call init_site() automatically
    instead of erroring (@olivroy, #2329).

  • build_article() gains a new new_process argument which allows to build a
    vignette in the current process for debugging purposes. We've also improved
    the error messages and tracebacks if an article fails to build, hopefully
    also making debugging easier (#2438).

  • build_article_index() and build_reference_index() use an improved BS5
    template that correctly wraps each section description in a <div>, rather
    than a <p>. This eliminates an empty pargraph tag that preceded each section
    description (#2352).

  • build_home() no longer errors when you have an empty .md file (#2309).
    It alos no longer renders Github issue and pull request templates
    (@hsloot, #2362)

  • build_news() now warns if it doesn't find any version headings, suggesting
    that that NEWS.md is structured incorrectly (#2213).

  • build_readme() now correctly tweaks links to markdown files that use an
    anchor, e.g. foo.md#heading-name (#2313).

  • build_reference_index() gives more informative errors if your contents
    field is malformed (#2323).

  • check_pkgdown() no longer errors if your intro vignette is an article is
    not listed in _pkgdown.yml (@olivroy #2150).

  • data_template() gives a more informative error if you've misspecified the navbar (#2312).

pkgdown 2.0.8

10 Apr 18:47
Compare
Choose a tag to compare
  • pkgdown is now compatible with (and requires) bslib >= 0.5.1
    (@gadenbuie, #2395), including a fix to BS5 navbar template to get
    navbar.type: dark to work with Bootstrap 5.3+ (@tanho63, #2388)

  • Now uses cli to provide interactive feedback.

  • Avoid unwanted linebreaks from parsing DESCRIPTION (@salim-b, #2247).

  • Translations

  • build_article_index() now sorts vignettes and non-vignette articles
    alphabetically by their filename (literally, their basename()), by default
    (@jennybc, #2253).

  • Deprecated build_favicon() was removed (build_favicons() remains).

  • build_articles() now sets RNG seed by default. Use
    build_articles(seed = NULL) for the old (unreproducible) behaviour.
    (@salim-b, #2354).

  • build_articles() will process .qmd articles with the quarto vignette
    builder (@rcannood, #2404).

  • build_articles() and build_reference() now set RNG seed for htmlwidgets
    IDs. This reduces noise in final HTML output, both for articles and examples
    that contain htmlwidgets (@salim-b, #2294, #2354).

  • build_news() correctly parses of github profiles and issues into links
    when present at the beginning of list items (@pearsonca, #2122)

  • build_reference() sets seed correctly; it was previously reset too early
    (@salim-b, #2355)

  • Rd -> html translation

    • \cr is now translated to <br> not <br /> (#2400).
    • Correct usage for S3 methods with non-syntactic class names (#2384).
    • Preserve Markdown code blocks with class rmd from roxygen2 docs (@salim-b, #2298).
  • build_reference_index() no longer generates redundant entries when multiple
    explicit @usage tags are provided (@klmr, #2302)

  • build_reference_index() correctly handles topic names that conflict with
    selector functions (@dmurdoch, #2397).

pkgdown 2.0.7

14 Dec 15:26
Compare
Choose a tag to compare

pkgdown 2.0.6

16 Jul 16:47
Compare
Choose a tag to compare
  • If you're using an RStudio daily, output file names are now clickable,
    previewing the generated HTML in the browser (#2157).

  • Getting started vignette no longer needs to be included in the articles index
    (#2150).

  • If there aren't any functions in the \usage{} block, then pkgdown will
    now shows all aliases on the reference index, rather than just the topic
    name (#1624).

pkgdown 2.0.5

23 Jun 15:46
Compare
Choose a tag to compare
  • Correctly generate downlit link targets for topics that have a file name
    ending in . (#2128).

  • build_articles(): if build fails because the index doesn't include all
    articles, you're now told what articles are missing (@zkamvar, #2121).

  • build_home() now escapes angle brackets in author comments(#2127).

  • build_home() will automatically render and link .github/SUPPORT.md
    (@IndrajeetPatil, #2124).

  • build_news() once again fails to link @username at start of
    bullet. I had to reverted #2030 because of #2122.

  • build_reference(): restore accidentally nerfed has_keyword() and
    has_concept() reference selectors (#2126) and add tests.

pkgdown 2.0.4

10 Jun 12:36
Compare
Choose a tag to compare
  • New check_pkgdown() provides a lightweight way to check that your
    _pkgdown.yml is valid without building the site (#2056). Invalid
    _pkgdown.yml now consistently generates errors both locally and on
    CI (#2055).

  • build_article() now supports inline markdown in the title (#2039).

  • build_home() no longer shows development status badges on the released
    version of the site (#2054).

  • build_news() support automated @username links in more places (#2030).

  • build_reference():

    • You can once again exclude topics from the reference index with - (#2040).

    • Inline markdown in titles and subtitles is now supported(#2039).

    • Package logos will be automatically stripped from the .Rd you don't end
      up with two on one page. (#2083).

    • \figure{file}{alternative text} with multline alt text is now parsed
      correctly (#2080)

    • roxygen 7.2.0 output for generic code blocks (#2092, @jabenninghoff) is
      processed correctly.

  • Front end changes:

    • Automatically added links in code blocks are now styled less aggressively,
      so they occupy less visual weight on the page (#2007).

    • All article pages are given class col-md-9 for consistency with other
      pages (#2045).

    • Fixed width HTML widgets are sized correctly (@dmurdoch, #2062).

    • Footnotes work with more contents, including code (@banfai, #2042).

    • Navbar components now accept target argument (#2089, @JSchoenbachler).

  • New syntax highlighting themes a11y-light, a11y-dark, monochrome-light,
    monochrome-dark, and solarized

pkgdown 2.0.3

24 Apr 15:07
Compare
Choose a tag to compare
  • Fixes for R CMD check

pkgdown 2.0.2

18 Jan 17:25
Compare
Choose a tag to compare
  • New Korean (ko) translation thanks to @mrchypark and @peremen (#1994).
    New Danish (dk) translation thanks to @LDalby.

  • build_articles() now adjusts the heading levels of vignettes/articles that
    use <h1> as section headings to ensure that there's one top-level heading
    (#2004). This ensures that there's one <h1>, the title, on each page,
    and makes the TOC in the sidebar work correctly.

  • build_home_index() no longer spuriously complains about missing images
    if you use plots in your README.Rmd (#1980, #1977). It no longer
    tweaks the src path for <img> tags with absolute paths (#1955).

  • build_news() once again works if NEWS.md uses <h1> headings (#1947).

  • build_reference() now correctly interprets title: internal: it removes
    the section from the reference index and it doesn't list the topics in that
    section as missing (#1958).

  • build_reference() now gives a correct hint when the reference index YAML
    is not formatted correctly (e.g. empty item, or item such as "n" that needs
    to be escaped with quotes to not be interpreted as Boolean) (#1995).

  • deploy_to_branch() gains a subdir argument, allowing you to deploy the
    site to a subdirectory (@gadenbuie, #2001).

  • Front end changes:

    • The navbar gets a little more space after the version number, and aligns
      the baseline with rest of the navbar (#1989).

    • Long lines in code output once again scroll, rather than being wrapped.
      While this is different to what you'll see in the console, it's a better
      fit for web pages where the available code width varies based on the
      browser width (#1940).

    • scrollspy (which highlights the "active" heading in the sidebar) now
      computes the offset dynamically which makes it work better on sites with
      taller navbars (#1993).

    • Fixed js issues that occurred on pages without a table of contents
      (@gadenbuie, #1998).

    • When htmlwidgets with jQuery or Bootstrap dependencies are used in examples or
      articles, pkgdown's versions of jQuery and Boostrap will take precedence over
      the versions used by the htmlwidget (@gadenbuie, #1997).

  • pkgdown no longer includes bundled author metadata for Hadley Wickham,
    RStudio, or the RConsortium, since there are now ways to include this
    meta data in template packages, and special casing these three entities
    feels increasingly weird (#1952).

pkgdown 2.0.1

03 Dec 12:57
Compare
Choose a tag to compare
  • Fix CRAN failures.

  • Reference sections are de-duplicated correctly (#1935).

  • Usage sections only generated for topics that have them; usage correctly
    displayed with BS3 (#1931)

  • Empty \value{} no longer errors (#1930).

pkgdown 2.0.0

30 Nov 21:48
Compare
Choose a tag to compare

New authors

@maelle is now a pkgdown author in recognition of her significant and sustained contributions. She was the powerhouse behind many of the improvements in this release, particularly the switch to bootstrap 5, improvements to customisation, and implementation of local search.

Bootstrap 5

  • pkgdown can style your site with Bootstrap 5 (with help from @jayhesselberth,
    @apreshill, @cpsievert). Opt-in by setting boostrap version in your
    _pkgdown.yml:

    template:
      bootstrap: 5
  • We reviewed site accessibility and made a number of small improvements:
    (#782, #1553):

    • Default font is larger and links are always underlined.
    • Heading anchors use aria-hidden to reduce noise for screenreader users.
    • Navbar dropdowns has improved aria-labelledby.
    • The default GitHub/GitLab links gain an aria-label; use for other
      icons is now supported, and encouraged in the docs.
    • Syntax highlighting uses a new more
      accessible colour scheme,
      designed by Alison Hill (#1536)
    • A skip link makes it easier to get directly to the page contents (#1827).
  • In-line footnotes mean you can read asides next to the text they refer to.

  • Articles support tabsets,
    as in R Markdown.
    (@JamesHWade, #1667).

  • Other minor styling improvements:

    • The active item in TOC is indicated with background colour, rather than
      a border.
    • If present, the package logo is shown on all pages near the header.
    • Section anchors now appear on the right (making them usable on mobile
      phones) (#1782).
    • The TOC is scrollable independently of the main content. This makes it
      more useful on long pages with many headings (#1610).
    • The sidebar is shown at the bottom of the page on narrow screens.
    • Function arguments and the reference index (#1822) use definition lists
      (<dl>) instead of tables. This gives more room for long argument
      names/lists of function and detailed descriptions, and displays better
      on mobile.
    • Links on the homepage no longer show the full url in the text.
    • The default navbar no longer includes a home icon - this took up
      precious horizontal space and wasn't very useful since there was already
      a link to the home page immediately to its left (#1383).

Local search

  • pkgdown now supports local searching (i.e. searching without an external
    service), and is enabled by default for Bootstrap 5 sites since no set-up is
    needed (#1629, with help from @gustavdelius in #1655 and @dieghernan &
    @GregorDeCillia in #1770).

  • pkgdown builds a more exhaustive sitemap.xml even for websites built with
    Bootstrap 3. This might change Algolia results if you use Algolia for search
    (#1629).

Customisation

  • New vignette("customise") documents all the ways you can customise your
    site, including the new options described below (#1573).

  • Sites can be easily themed with either bootswatch themes or by selectively
    overriding the bslib variables used to generate the CSS. pkgdown now uses
    scss for its own Bootstrap css tweaks, which means that you can customise
    more of the site from within _pkgdown.yml.

  • You can pick from a variety of built-in syntax highlighting themes (#1823).
    These control the colours (and background) of code in <pre> tags.

  • pkgdown can now translate all the text that it generates (#1446): this means
    that if you have a package where the docs are written in another language, you
    can match all the pkgdown UI to provide a seamless experience to non-English
    speakers. Activate the translations by setting the lang in _pkgdown.yaml:

    lang: fr

    pkgdown includes translations for:

    If you're interested in adding translations for your language please file
    an issue and we'll help you get started.

  • Template packages can now provide inst/pkgdown/_pkgdown.yml which is used
    as a set of defaults for _pkgdown.yaml. It can be used to (e.g.) provide
    author definitions, select Bootstrap version and define bslib variables,
    and customise the sidebar, footer, navbar, etc. (#1499).

  • New includes parameters in-header, before-body, and after-body
    make it easy to add arbitrary HTML to every page. Their content will be
    placed at the end of the <head> tag, right below the opening <body> tag,
    and before the closing tag </body> respectively (#1487). They match the
    bookdown options in_header, before_body and after_body.

    Additionally, you can use before_title, before_navbar, and
    after_navbar to add arbitrary HTML into the navbar/page header; they
    will appear to the left of the package name/version, and to the left and
    right of the navigation links respectively (#1882).

  • Authors configuration is more flexible (#1516). You can now:

    • Choose the roles used for filtering authors for the sidebar and footer.
    • Choose the text before authors in the footer.
    • Add text before and after the authors list in the sidebar.
    • Add text before and after the authors list of the authors page.
  • Sidebar specification is more flexible (#1443, #1488, #1502). You can now:

    • Change the order of sidebar elements.
    • Add custom sidebar sections (with Markdown/HTML text).
    • Add a table of contents to the home page.
    • Completely suppress the sidebar.
    • Provide your own HTML for the navbar.
  • Footer specification is more flexible (#1502). You can now:

    • Change the placement of elements on the left and right.
    • Add text to the left and right (or even remove/replace default text)
  • You can now exclude all default components from the navbar (#1517).

  • Expert users can now override layout templates provided by pkgdown or template
    packages by placing template files in pkgdown/templates (@gadenbuie, #1897).

New features

  • pkgdown now supports redirects (#1259, @lorenzwalthert). The following yaml
    demonstrates the syntax, with old paths on the left and new paths/URLs on
    the right.

    redirects:
      - ["articles/old-vignette-name.html", "articles/new-vignette-name.html"]
      - ["articles/another-old-vignette-name.html", "articles/new-vignette-name.html"]
      - ["articles/yet-another-old-vignette-name.html", "https://pkgdown.r-lib.org/dev"]
  • Use HTML classes pkgdown-devel or pkgdown-release to declare that certain
    content should appear only on the devel or release site. Use the class
    pkgdown-hide for content that should only appear only on GitHub/CRAN
    (#1299).

  • New pkgdown_sitrep() function reports whether the site is set up correctly;
    in particularly it currently reports if auto-linking will work (#1478).

Code

  • Styling for errors, warnings, and messages has been tweaked. Messages
    are now displayed the same way as output, and warnings and errors are
    bolded, not coloured. This is part of a suite of changes that aim to
    give package authors greater control over the appearance of messages,
    warnings, and errors.

  • Long lines in code output are now wrapped, rather than requiring scrolling.
    This better matches rmarkdown::html_document() and what you see in the
    console.

  • build_reference() now allows linking to topics from other packages (either
    function names e.g. rlang::is_installed or topic names e.g.
    sass::font_face). (#1664)

  • build_reference() now runs examples with
    options(rlang_interactive = FALSE) (ensuring non-interactive behaviour in
    functions that use rlang::is_interactive()), options(cli.dynamic = FALSE),
    Sys.setenv(RSTUDIO = NA) and Sys.setLocale("LC_COLLATE", "C") (#1693).
    It also runs pkgdown/pre-reference.R before and pkgdown/post-reference.R
    after examples. These allow you to do any setup or teardown operations you
    might need (#1602).

  • A reference index section with title: internal is now silently dropped,
    allowing you to suppress warnings about topics that are not listed in the
    index (#1716).

  • Code blocks are now highlighted according to their declared language
    (e.g. yaml) if the documentation was built with roxygen2 7.1.2 or later
    (#1690, #1692).

  • New pkgdown_print() allows you to control how your objects are rendered in
    examples. It includes built-in handling for htmlwidgets and "browseable" HTML
    so pkgdown output now more closely resembles what you see in RStudio.
    Added extension points to make HTML widgets (and RGL in particular) work
    in rendered examples (@dmurdoch).

  • You can globally set the width of code output (in reference and articles)
    with

    code:
      width: 50
  • Articles now render output styles created by cli/crayon (#1556).

  • When copy and pasting code blocks, lines containing output (e.g. #>)
    are automatically omitted (#1675).

  • Auto-linking improvements:

    • Links to inherited R6 methods now work correctly for both internal
      (#1173, @vandenman) and external (#1476) parent classes.

    • Linking no longer fails if a package contains duplicated Rd aliases.

    • Correctly link to reference pages when the \name{} entry doesn't match
      the file name (@dmurdoch, #1586; #16...

Read more