Skip to content

Releases: r-lib/pkgdown

pkgdown 2.1.3

18 May 14:10
Compare
Choose a tag to compare
  • Menu items can now set class and id.

pkgdown 2.1.2

28 Apr 12:22
Compare
Choose a tag to compare

New features

  • ROR IDs in DESCRIPTION are transformed into icons, similar to ORCID IDs. (#2850)
  • New clean_site(force = TRUE) for cleaning of docs/ regardless of whether it was built by pkgdown (#2827).
  • The language of the site is set from the first Language: in the DESCRIPTION if it is available and no other language is specified (@jonthegeek, #2808).

Bug fixes and minor improvements

  • Option pkgdown.internet was removed because CDN file caching now requires an internet connection.
  • Math rendering using katex and mathjax was improved and now includes necessary components using CDN (#2704).
  • Articles have improved test cases (thanks to @venpopov and @ethanbass).
  • Sass variables from bslib are now used to set the navbar background color: $navbar-bg for the background color in light and dark mode, or $navbar-light-bg and $navbar-dark-bg for individually controlling light and dark mode background colors. pkgdown-navbar-bg and $pkgdown-navbar-bg-dark both still provide pkgdown-specific overrides (@gadenbuie, #2847).
  • Code repositories hosted on Codeberg are now supported in the BugReports and URL fields (@nfrerebeau, #2843).
  • Links to favicons in page headers were updated to reflect changes to https://realfavicongenerator.net/ (#2804). Favicons should be re-generated by manually removing the pkgdown/favicon directory and then running pkgdown::build_favicons().
  • Reinstate Rd macro loading, which was accidentally disabled in v2.1.1 (#2782).

pkgdown 2.1.1

18 Sep 13:57
Compare
Choose a tag to compare
  • Added keyboard shortcut, /, to focus search bar (#2423)
  • The BugReports field can now be an email (@catalamarti, #2275).
  • New clean_cache() function removes the contents of the cache directory (#2718).
  • pkgdown now depends on R >= 4.0.0 (#2714)
  • Updated GitHub Actions advice and workflows around Quarto install (@tanho63, #2743)

pkgdown 2.1.0

07 Jul 14:05
Compare
Choose a tag to compare

Major changes

  • Added @olivroy and @salim-b as pkgdown authors in recognition of their contributions.
  • build_articles() and build_article() now support articles/vignettes written with quarto (version 1.5 and above). Combining the disparate quarto and pkgdown templating systems is a delicate art, so while I've done my best to make it work, there may be some rough edges. So please file an issue you encounter quarto features that don't work quite right. Learn more in vignette("quarto")(#2210).
  • New light switch makes it easy for users to switch between light and dark themes for the website (based on work in bslib by @gadenbuie). For now this behaviour is opt-in with template.light-switch: true but in the future we may turn it on automatically. See the customization vignette for details (#1696).
  • New vignette("translations") that discusses non-English sites including how to submit new translations (#2605).
  • New vignette("accessibility") describes what manual tasks you need to perform to make your site as accessible as possible (#2344).
  • New template.math-rendering allows you to control how math is rendered across your site. The default uses mathml which is low-dependency, but has the lowest fidelity. You can also use mathjax, the previous default, and katex, a faster alternative. (#1966).
  • All external assets (JS, CSS, fonts) are now directly included in the site instead of fetched from external CDN (@salim-b, #2249)
  • YAML validation has been substantially improved so you should get much clearer errors if you have made a mistake (#1927). Please file an issue if you find a case where the error message is not helpful.

Lifecycle changes

  • autolink_html() was deprecated in pkgdown 1.6.0 and now warns every time you use it. downlit::downlit_html_path() should be used instead.
  • build_site(document) and build_reference(document) has been removed after being deprecated in pkgdown 1.4.0. devel should be used instead.
  • preview_page() has been deprecated (#2650).
  • Bootstrap 3 has been deprecated. It was superseded in December 2021, and now we're starting to more directly encourage folks to move away from it.

Front end changes

  • When built on GitHub, source urls now use the name of the current upstream branch (rather than HEAD), which is more likely to generate correct links (#2597).
  • The search dropdown has been tweaked to look more like the other navbar menu items (#2338).
  • Improve HTML5 compliance (#2369):
    • No longer support IE9 or earlier
    • Strip trailing whitespace
    • Label <nav>s and improve navbar html.
  • Tweaked navbar display on mobile so that long titles in drop downs (e.g. article titles) are now wrapped, and the search input spans the full width (#2512).
  • The title for the "Reference" page is now "Package index" since this page might contain more than just function details (#2181).
  • Very wide words are now automatically broken across lines and hyphenated (when possible) when they'd otherwise create a horizontal scrollbar on mobile (#1888).
  • The mobile version of pkgdown sites no longer has a scrollburglar (a small amount of horizontal scroll) (#2179, @netique).
  • Anchors are displayed when they're the target of a link.
  • New translation for "Search site", the label applied to the search box for screenreaders. This was previously incorrectly labelled as "Toggle navigation" (#2320).
  • pkgdown no longer overrides the default selection colours. This improves accessibility for users who have set their own colours in their browser settings (#2139, @glin).
  • If you put a dropdown menu (e.g. articles) on the right hand side of the navbar, it will now be right aligned. This makes longer titles more likely to stay on the page (#2421).
  • BS5 templates no longer include empty link to logo when none exists (#2536).
  • Updated translations from @jplecavalier, @dieghernan, @krlmlr, @LDalby, @rich-iannone, @jmaspons, and @mine-cetinkaya-rundel (#2659).

_pkgdown.yaml

  • Anywhere you can use _pkgdown.yml, you can now use _pkgdown.yaml (#2244).
  • Custom navbars that specify icon but not aria-label will now generate a message reminding you to provide one for to improve accessibility (#2533).
  • The repo.source.url field no longer requires a trailing slash (#2017).
  • The template.bslib item now also accepts a bootswatch key (@gadenbuie, #2483).
  • You can now choose where the search box is placed with the "search" navbar component. This has been documented for a very long time, but as far as I can tell, never worked (#2320). If you have made your own template with a custom navbar, you will need to remove the <form> with role="search" to avoid getting two search boxes.

Minor improvements and bug fixes

  • pkgdown now uses httr2 instead of httr (#2600).

  • Mathjax now uses version 3.2.2.

  • The addin now runs build_site() instead of build_site_external(), which generally should be more reliable (#2252).

  • <source> tags now have their srcref attributes tweaked in the same way that the src attributes of <img> tags are (#2402).

  • as.pkgdown() will no longer prompt you to install a missing template package from CRAN, since these are almost always found in GitHub (#2076).

  • build_articles() now recognises a new external-articles top-level field that allows you to define articles that live in other packages (#2028).

  • build_article() no longer has a data argument. This is technically a breaking change, but I can't figure out why anyone would have ever used it.

  • build_*() (apart from build_site()) functions no longer default to previewing in interactive sessions since they now all emit specific links to newly generated files.

  • build_article() now translates the "Abstract" title if it's used.

  • build_article() now escapes html characters in the title (#2286).

  • build_article() no longer generates the wrong source link when you build your site outside of the root directory (#2172).

  • build_articles() now reports if you are missing alt-text for any images (#2357).

  • build_articles() now drops a section called "internal". This allows you to have articles that either aren't indexed at all or are included manually elsewhere in the navbar (#2205).

  • build_home() now correctly escapes special HTML characters in the bibtex citation (#2022).

  • build_home() no longer checks if the README is missing any images. This check is now performed in build_site(), after build_articles() so you can refer to images created by vignettes with warnings (#2194).

  • build_home() now includes the contents of inst/AUTHORS on the authors page (#2506).

  • build_home_index() now reports when rendering the home page (#2544).

  • build_home_index() now renders math if you use it in your home page (#2263).

  • build_news() now works if your package has been archived at some point (#2687).

  • build_news() only syntax highlights the page once, not twice, which prevents every block of R code getting a blank line at the start (#2630).

    1 + 1
  • build_reference() no longer displays \dontshow{} or \testonly{} blocks in examples. It will run the code in \dontshow{}; it won't run the code in \testonly{}(#2188).

  • build_reference() does a better job of parsing \value{} blocks (#2371).

  • build_reference() now generates the usage that users actually type for infix and replacement methods (#2303).

  • build_reference() now automatically translates --, ---, ``, and '' to their unicode equivalents (#2530).

  • build_reference() now supports \Sexpr[results=verbatim] (@bastistician, #2510).

  • build_reference() adds anchors to arguments making it possible to link directly to an argument, if desired. A subtle visual treatment makes it easy to see which argument is targeted (#2228).

  • build_reference() now automatically renders any tables created by gt (#2326).

  • build_reference() matches usage for S3 and S4 methods to the style used by R 4.0.0 and later (#2187).

  • build_reference_index() now displays function lifecycle badges next to the function name (#2123). The badges are extracted only from the function description. You can now also use has_lifecycle() to select functions by their lifecycle status.

  • build_redirects() is now exported to make it easier to document (#2500).

  • build_redirects() now automatically adds redirects for topic
    aliases. This matches the behaviour of ? and will help keep links stable in the long term (#1876).

  • build_redirects() now reports which redirects it is generating.

  • build_site() automatically runs pkgdown_sitrep() at the start of the process (#2380).

  • build_sitemap() no longer includes redirected pages (#2582).

  • check_pkgdown() and pkgdown_sitrep() have been unified so that they both report on the same problems. They now only differ in the style of their output: pkgdown_sitrep() reports whether each category is ok or not ok, while check_pkgdown() errors on the first issue (#2463).

  • init_site() will no longer automatically build favicons on CI systems (e.g. GHA). This is an expensive operation that uses an external service so it should only be run locally (#2553).

  • init_site() once again describes one copy per line, and now uses a better prefix when copying assets from pkgdown itself (#2445).

  • pkgdown_sitrep()/check_pkgdown() now check that you have up-to-date favicons if you have a package logo.

  • template_reference() and template_article() now only add backticks to function names if needed (#2561).

  • vignette("search") has been removed since BS3 is deprecated and all the BS5 docs are also included in build_search() (#2564).

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