Skip to content

Support downlit-style auto-linking for R function and package references #235

@cwickham

Description

@cwickham

The downlit R package auto-links package and function references in rendered R content. Two flavors:

  1. Code-block autolinks — function names inside R code blocks become hyperlinks to their docs (rdrr.io for base R / CRAN packages, pkgdown sites for tidyverse-style packages).

    Example:

    <a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a>("bslib")
  2. Prose autolinks — bare-word mentions of "attached" packages in prose link to the package homepage. Triggered by an options(download.attached = c("shiny", "bslib")) chunk in the source .qmd.

    Example: every plain-text bslib mention becomes <a href="https://rstudio.github.io/bslib/">bslib</a>.

The current Hugo site renders neither flavor. Supporting them would benefit ported posts (authored expecting downlit) and any new R-content posts.

Ported posts where downlit-generated links are missing

Post Local Legacy
bslib-dashboards opensource.posit.co shiny.posit.co
bslib-tooltips opensource.posit.co shiny.posit.co
shiny-r-1.8.0 opensource.posit.co shiny.posit.co
shiny-r-1.8.1 opensource.posit.co shiny.posit.co

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions