Open mine-cetinkaya-rundel opened 2 years ago
Where do you think it should appear on the documentation page?
I think it should appear pretty high up, as not everyone will scroll down. Something like an "open in browser" icon (though it does more than opening that file in the browser) or something like a badge?
That'd be pretty hard to do from from roxygen2; maybe it could be an IDE feature instead?
That was my first instinct too, but then I thought this is useful to know even if you don't use RStudio.
What about something simpler like the function title being a URL? And there could, in addition, be an IDE feature that's makes it a bit more clear like in these examples.
We could inject some HTML that creates the button?
The more I think about it, the more I think this should be handled by the API — if we inject it with roxygen, we'd also need to add parallel handling in pkgdown to strip it out.
This is a feature request to add a link to each function's documentation that said something like "read on package website" that takes you there. Ideally the link would take you to the function documentation directly, but it could also be a generic link that is the same for all functions that takes you to the Reference page of the package website.
The motivation for this request is that
?foo
is very easy to learn/teach but what you get is a much more subpar documentation reading experience than reading on the package website, particularly for examples. Also, the more I'm teaching withlibrary(tidyverse)
andlibrary(tidymodels)
, the less the names of individual packages come up, so students sometimes have no idea which package website to go to find function information.