conan-io / docs

conan.io reStructuredText documentation
http://docs.conan.io
MIT License
104 stars 356 forks source link

[feature] Recipe attribute for library documentation url #2545

Open danimtb opened 2 years ago

danimtb commented 2 years ago

It would be nice to have an optional attribute for recipes to add a URL to the documentation of the library.

As url attribute points to the recipe origin repo (in the case of ConanCenter it is always conan-center-index repo) and homepage usually points to the library's repo or project web page, we are missing a direct link to the library documentation that could be:

This would be nice information to have in order to get library code reference quickly via recipe inspection from Conan command line or from a future redesign of the ConanCenter webpage.

memsharded commented 2 years ago

This doesn't require any support in Conan client, besides a documented convention. Probably decide the name docs = "url" sounds good, and move this to the Conan docs repo to document it?

danimtb commented 2 years ago

Yes, it is a convention but that information needs a way to be extracted so we can retrieve it for ConanCenter web.

I believe it would need to be exposed to the json output via conan inspect or similar command, so it would need some small changes in the client.

memsharded commented 2 years ago

You can already query any attribute with conan inspect -a, no need to explicitly expose it. And Conan 2.0 will iterate all public attributes by default, so it will be included in the default automatically.