posit-dev / posit-dev/open-source-website

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

Open
#235 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
55
Forks
24
Avg merge
1d 21h
Merged PRs (30d)
17

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Hugo rendering path for R code blocks and the .qmd metadata that supplies options(download.attached = ...). Verify the implementation against the four listed ported posts; done means both code-block function links and prose package links render as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
hugo, r
Domain
documentation, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.