Useful for linking to files on Github that live in a local clone of a repo

gh_link(
  text = NULL,
  path,
  repo,
  user = "petrbouchal",
  remote = NULL,
  branch = "main"
)

Arguments

text

Link text

path

path to file (the bit that goes after /tree/branch, so presumably the local path from project root)

repo

repo name; used if `remote` is not provided.

user

Github user; used if `remote` is not provided. Defaults to `"petrbouchal"`

remote

remote in the form of user/repo.

branch

branch. Default `"main"`

Value

character vector of same length as inputs

Inputs are recycled if not all of the same length