12 Make your package easier to discover: Control the metadata / SEO
12.1 Package metadata
12.1.1 Basic information in DESCRIPTION
The first step towards making your package easier to find by search is to polish those DESCRIPTION fields:
- Description
- Details
- URL: Include your R-universe URL. Example
12.1.2 How to add keyword labels to an R package?
R-universe’s search algorithm leverages keywords associated with a package.
- For GitHub-hosted packages: Add keywords using repository topics.
- For any package, including CRAN-compliant packages: Use the
X-schema.org-keywords
field in theDESCRIPTION
file. This field is CRAN-permitted.
Additionally, the build system may automatically generate keywords based on package analysis, including linked system libraries or language tags like c++
or openmp
.
12.1.3 How to increase the rank of a package?
Your package’s rank in search results depends on its ranking algorithm.
To improve ranking, you can follow strategies from the blog post “Marketing Ideas For Your Package”. In particular, gaining more GitHub stars will improve the rank.
12.1.4 How to get a package logo shown in the packages tab?
R-universe uses pkgdown
conventions to detect package logos:
- Place the logo in
man/figures/logo.png
orman/figures/logo.svg
, which can be checked bypkgdown:::find_logo()
. - Alternatively, specify the logo as an opengraph image in your
_pkgdown.yml
.
12.2 Individual (contributor, maintainer) metadata
12.2.1 How to link a maintainer email addresses to a username on R-universe?
R-universe associates maintainers with their GitHub usernames based on email addresses.
- Use as email address in your
DESCRIPTION
file’s maintainer field or commits, one of the email addresses you registered on GitHub.
- If you use multiple email addresses, add them to your GitHub settings.
Once the email is validated on GitHub, future builds of your packages will reflect the association. Note that changes take effect after the next package build.
12.2.2 My profile picture or contributor statistics do not show up
If your profile picture or contributor statistics are not visible:
- Ensure the email used in the package
DESCRIPTION
file is registered in your GitHub settings.
- Wait for the next package rebuild for the changes to be reflected.