pub-dev icon indicating copy to clipboard operation
pub-dev copied to clipboard

Generated link in Example tab is broken

Open rcagala opened this issue 1 year ago • 3 comments

The first element in the Example tab is a generated link. This is not a content of example/README.md. According to my observation, there are two scenarios:

  1. pubspec.yaml contains repository (usually pointing to GitHub). In this case the generated link works fine.
  2. pubspec.yaml DOES NOT contain repository. In this case the generated link is broken.

I observed this behavior on many different packages.

Note: File example/README.md does exist and the content of this file a rendered right under the generated link.

pub-dev-example-link

rcagala avatar Jul 29 '24 08:07 rcagala

Could you link to a concrete package page exposing the problem?

@isoos might know what is going on here.

sigurdm avatar Jul 29 '24 11:07 sigurdm

Could you link to a concrete package page exposing the problem?

@isoos might know what is going on here.

E.g. https://pub.dev/packages/dot_document/example

As I mentioned, I believe this affects all packages without a defined repository in their pubspec.yaml. In other words, packages lacking a 'Repository' link on the right of their package page.

rcagala avatar Jul 29 '24 11:07 rcagala

Yeah - that link is broken.

I guess that until we get embedded source listings on pub.dev we should just not link anywhere if there is no repository associated with a package.

sigurdm avatar Jul 29 '24 11:07 sigurdm