← Back to all sparks
P

pkgdown

INFRA · APIS
Velocity0.0

Build static documentation websites for R packages from roxygen comments

pkgdown now generates llms.txt and a markdown copy of every documentation page

documentationllm-readablequartodark-modestatic-sites
Current state
pkgdown builds the documentation sites for most R packages. The 2.1 line was about format and appearance - Quarto vignettes, a light and dark switch, self-hosted assets instead of CDN fetches. The 2.2 line changed audience: build_llm_docs() emits an llms.txt at the site root and a markdown version of every page, on by default.
Where it's heading
Two audiences are now being served from one build. Human-facing work continues in small increments - dark-mode plot filtering, new translations, a local http server so search works in preview - while the new machine-facing output is opt-out rather than opt-in. The default matters more than the feature: thousands of package sites will start emitting llms.txt without their maintainers choosing to.
Prediction
Expect the markdown output to gain the same configuration surface the HTML has, and the llms.txt contents to get more selective as maintainers discover what ends up in it; a way to exclude individual pages is the obvious next request.

Recent moves

  1. 1mo ago

    Local preview served over http so search works

    Site preview moves from opening files directly to serving them from a local http server, which is what search and other dynamic features need in order to run. Small, but it closes the gap between what you see previewing and what visitors get.

    View source ↗
  2. 9mo ago

    build_llm_docs() emits llms.txt and markdown for every page

    ⚡ SPARK

    pkgdown starts building for machine readers as well as human ones, and does it by default - llm-docs: false is the opt-out. Set against the rest of this release, which is translations, dark-mode plot handling and a quiet argument, it is plainly the change that shifts what a pkgdown site is.

    View source ↗
  3. 1y ago

    Menu items accept class and id attributes

    A single-line release letting navbar menu items carry class and id attributes for styling and targeting. Nothing else shipped.

    View source ↗
  4. 1y ago

    ROR IDs, Codeberg support, bslib navbar variables

    Breadth rather than depth: research organization IDs render as icons like ORCIDs, Codeberg joins GitHub and GitLab as a recognized forge, site language is inferred from DESCRIPTION, and navbar colors now come from bslib Sass variables instead of pkgdown-specific ones. Typical of the 2.1 line's incremental polish.

    View source ↗
  5. 1y ago

    Keyboard shortcut for search; clean_cache() added

    Small usability additions - a slash shortcut to focus the search bar, an email-valued BugReports field, and clean_cache() for clearing the build cache. The R 4.0 minimum is the only change with consequences for maintainers.

    View source ↗
  6. 2y ago

    Quarto vignettes, light/dark switch, self-hosted assets

    The largest release in this window and the foundation of the 2.1 line: Quarto vignettes build alongside RMarkdown ones, an opt-in light and dark switch arrives from bslib, math rendering becomes configurable, and all JS, CSS and fonts are bundled into the site rather than fetched from a CDN. Broad rather than directional - each piece is catching up to something the surrounding ecosystem already assumed.

    View source ↗