pkgdown
pkgdown copied to clipboard
More support for lifecycle badges in reference index?
When a Rd page has a lifecycle badge such as https://tidyr.tidyverse.org/reference/spread.html should it be detected and stored with the rest of the Rd info to e.g. provide helpers to build the reference index?
Just wanted to add that I encountered one project where badges were used as titles to achieve this. I'm not sure if it was intended, since it also clobbers the actual titles for their docs. Regardless, it was super cool to see the lifecycle status so prominently displayed at a glance across the whole package.
Screenshot of what it looks like in case the page gets updated:
I'd love to see this developed into a more central part of pkgdown
. It's so much easier to quickly gauge the state of the package export surface.
I like @dgkf-roche's idea of making the badges visible on the reference index. Or, if not the badges, something based on the badge, an alert of some kind using colors from the boostrap theme?
Yeah, this would be really nice.
If we turn this on by default, we'll need to either provide an explicit opt-out, or some way to select some badges that you don't want to display. The tidyverse convention is to only label packages that have a different lifecycle stage to the package as a whole, but not everyone follows this convention, and it might be a bit busy if every function gets a label.
OTOH this would encourage people to follow our style 😄