pkgdown icon indicating copy to clipboard operation
pkgdown copied to clipboard

Using an email address in the BugReports field

Open mikeblazanin opened this issue 2 years ago • 1 comments

Feature/enhancement request:

I'd like to use an email address for the BugReports field and have pkgdown create a "Report a bug" link in the sidebar of the page that actually points to the email address.

In the past there had been some discussion of using the Maintainer email as the default for Report a bug when BugReports wasn't specified (#855, #871, #872), but this wasn't implemented in favor of a more conservative default

Currently, if BugReports: [email protected] then the sidebar link points to https://myaccount.github.io/mypackage/[email protected]. Instead it would be great if it generated a mailto link to [email protected]

mikeblazanin avatar Feb 08 '23 16:02 mikeblazanin

Looks like the link is generated here:

https://github.com/r-lib/pkgdown/blob/main/R/build-home-index.R#L167

I think the simplest fix would be to modify link_url() to generate a mailto link if the url doesn't start with http and contains a @. The repo and browse links can't ever be emails, which I think is ok, and this would allow the user to allow specify email addresses in the meta.home.links field.

Since I think this is a well scoped problem, I'm going to flag it as a potential tidyverse developer day issue to allow someone from the community to tackle it.

hadley avatar Apr 19 '24 19:04 hadley