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

Plugin site with GitHub sourced README resolves relative URLs wrong

    Details

    • Similar Issues:

      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

            Hide
            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.

            Show
            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.
            Hide
            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

            Show
            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
            Hide
            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

            Show
            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

              People

              • Assignee:
                Unassigned
                Reporter:
                danielbeck Daniel Beck
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: