Skip to content

Libdoc: Support custom library metadata #5747

Description

@fialsha

Problem

Libdoc shows a library's version, scope and keywords, but there is no standard place to link back to the project — where to install it from, report issues, or contribute. Library docs are often published separately from the source repo and package, so users who land on generated docs have no way back.

Proposal

Add fields for an official library URL homepage and source that Libdoc renders (HTML):

  • A ROBOT_LIBRARY_URL class/module attribute, mirroring ROBOT_LIBRARY_SCOPE / ROBOT_LIBRARY_VERSION.
  • A matching @library(url="https://...") argument, like the existing scope, version, doc_format, listener.
@library(scope="SUITE", version="1.0", url="https://github.com/example/MyLibrary")
class MyLibrary:
    """My example library."""

Alternatives

  • Free-form metadata dict (e.g. ROBOT_LIBRARY_METADATA = {"Homepage": "..."}) — more flexible but heavier than one well-known field.
  • Docstring convention only — works today but is unstructured and inconsistent between libraries.

Open questions

  • Attribute name: URL vs HOMEPAGE vs SOURCE; one URL or a small set of named links.

Related issues

Activity

  1. pekkaklarck commented on Aug 17, 2026

    @pekkaklarck
    Member

    Showing more metadata makes sense to me. Would it be enough to make this a Libdoc-only feature at least in the beginning? In practice we'd allow something like this:

    libdoc --metadata URL:http//example.com MyLib MyLib.html
    

    I pretty strongly believe we should make this a generic feature so that you can use whatever metadata you want instead of us dictating that you can use, for example, URL and Issues.

  2. pekkaklarck commented on Aug 17, 2026

    @pekkaklarck
    Member

    Ping @aaltat, do you have opinions on this? UI side of the feature should be pretty easy, we'd just show this stuff under current Version and Scope.

  3. aaltat commented on Aug 17, 2026

    @aaltat
    Contributor

    I think this is useful specially in the corporate world. There version control is not the place where issues live and version control is not the place where library documentation lives. Example in my company, version control is in GitHub, tickets live in Jira and library documentation is published to a in-house system. Which both are without clear linking and adding such information would be useful. Example I would mimic more what Python packages offers, https://packaging.python.org/en/latest/specifications/well-known-project-urls/#well-known-labels and provide separate URL to source code and issue tracker.

    I agree with Pekka and it should go near where the current metadata lives.

  4. added this to the v7.6 milestone on Oct 28, 2026
  5. pekkaklarck commented on Oct 28, 2026

    @pekkaklarck
    Member

    I consider this a useful feature and added this issue to RF 7.6 scope. We haven't yet started RF 7.6 development, but we can already now think about the design.

    This is predominantly a Libdoc feature, so I consider it important that Libdoc itself supports the --metadata command line option. That said, it would be convenient to specify metadata also in library code so that you didn't need to always use --metadata. For that using the @library decorator as proposed in the original description feels like the most convenient solution. As I wrote earlier, I want this to be a generic feature and thus I don't think @library should get dedicated arguments like url. A much simpler approach is adding it a single metadata argument that accepts a dictionary. This information wouldn't be used for anything during execution, but Libdoc would read it and use it as the base for metadata that can be then fine-tuned with the --metadata option. How does this sound for?

  6. aaltat commented on Oct 28, 2026

    @aaltat
    Contributor

    I think dictionary would be good choice. It is flexible and doesn’t hard code possible combinations.

  7. changed the title [-]Add homepage and source URL to library Libdoc documentation[/-] [+]Libdoc: Support custom library metadata[/+] on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions