Uploaded image for project: 'Jenkins Website'
  1. Jenkins Website
  2. WEBSITE-691

Plugin site with GitHub sourced README resolves relative URLs wrong

    XMLWordPrintable

Details

    Description

      See https://plugins.jenkins.io/aws-secrets-manager-credentials-provider

      At the bottom, it has

      ## Screenshots!
      
      [Credentials screen](img/plugin.png) 

      Since the README.md and the img/ directory are both in the docs directory, that works on GitHub:

      https://github.com/jenkinsci/aws-secrets-manager-credentials-provider-plugin#screenshots

      But it's a broken reference on the plugin site, which resolves the URL to https://github.com/jenkinsci/aws-secrets-manager-credentials-provider-plugin/blob/master/img/plugin.png (i.e. outside the docs/ directory).

      Attachments

        Issue Links

          Activity

            Plugins with non-standard location of the readme file can specify the full URL or the readme (in this case https://github.com/jenkinsci/aws-secrets-manager-credentials-provider-plugin/blob/master/docs/README.md ) so that the plugin site can get the readme through GitHub's "content" API endpoint. For the short URL the plugin site uses the "readme" endpoint which returns either the metadata or the content. So supporting this use-case will double the amount of requests to the "readme" endpoint.

            zbynek Zbynek Konecny added a comment - Plugins with non-standard location of the readme file can specify the full URL or the readme (in this case  https://github.com/jenkinsci/aws-secrets-manager-credentials-provider-plugin/blob/master/docs/README.md  ) so that the plugin site can get the readme through GitHub's "content" API endpoint. For the short URL the plugin site uses the "readme" endpoint which returns either the metadata or the content. So supporting this use-case will double the amount of requests to the "readme" endpoint.
            danielbeck Daniel Beck added a comment -

            Right, we need the path from the regular response, and the body from the Accept: … response asking for rendered HTML

            danielbeck Daniel Beck added a comment - Right, we need the path from the regular response, and the body from the Accept: … response asking for rendered HTML
            danielbeck Daniel Beck added a comment -

            A low-tech solution would be to poke expected URLs directly without going through the API to see what kind of response we get, but that's a hack

            danielbeck Daniel Beck added a comment - A low-tech solution would be to poke expected URLs directly without going through the API to see what kind of response we get, but that's a hack
            markewaite Mark Waite added a comment -

            As far as I can tell, this is resolved now. The https://plugins.jenkins.io/aws-secrets-manager-credentials-provider page shows screenshots at the bottom of the page as expected.

            markewaite Mark Waite added a comment - As far as I can tell, this is resolved now. The https://plugins.jenkins.io/aws-secrets-manager-credentials-provider page shows screenshots at the bottom of the page as expected.

            People

              Unassigned Unassigned
              danielbeck Daniel Beck
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: