rOpenSci | Improved permanent URL schema for

Improved permanent URL schema for

This post is part of a series of technotes about r-universe, a new umbrella project by rOpenSci under which we experiment with various ideas for improving publication and discovery of research software in R. As the project evolves, we will post updates to document features and technical details. For more information, visit the r-universe project page.

🔗 Pretty permanent URLs!

We have improved the URL schema for the front-end to make it even easier to find and share a link to an R package, article, API, or other resource.

The old URLs will now automatically be redirected to the new locations, so this should be a non-breaking change. But of course we recommend updating your references to link to the new permanent URLs.

🔗 Package homepages

The new URLs have the same form as github pages, where the homepage for a package can be found under the root directory of your universe url, i.e. https://{owner}{pkg}. For example the landing packages for some packages look like this:

And so on. The URLs above return package information in html format. Simply append /json to retrieve the same information (and more) in api format:

A few exemptions are the following root paths, which are reserved names for the r-universe front-end sections and cranlike-server, and hence do not refer to a package:

🔗 Resources within a package

Resources that are part of a package, such as the pdf/html manual, news file, and preferred citation, can now be found under that package URL. Some examples:

The URLs for these resources are, where possible, consistent with the CRAN website and/or the R local dynamic help server.

One benefit of the new schema is that you can link directly to sections within a package homepage. You can also find these links by clicking on the header of the section on the page.

🔗 Feeds and sitemaps

Finally there are some meta APIs that are mainly for non-human consumption:

That’s it for now. As said, in order to not break any existing links, we have created automatic redirects from the old URLs to the new location where possible. If you run into any problems, please open an issue in r-universe-org/help or send a message on the #r-universe channel in the ropensci slack.

Start discussion