roadie-backstage-plugins icon indicating copy to clipboard operation
roadie-backstage-plugins copied to clipboard

Links and images in the Readme card are displayed as broken

Open renatafaracobah opened this issue 1 year ago • 9 comments

Expected Behavior

  • Relative links should be rendered as https://<github-url>/<org>/<repo>/blob/develop/<relative-link>
  • Images should be rendered, even if the URL is relative (example: src=“image/cover.png”)
  • External links should be opened in a new tab

Current Behavior

  • Relative links always use github.com instead of finding the appropriate host based on the repository's location, which could be an enterprise GitHub Enterprise host.
  • Images with relative path show as broken (it renders as <current-page>/image/cover.png and not https://<github-url>/<org>/<repo>/blob/develop/image/cover.png)
  • Internal links are opened in the current tab

Steps to Reproduce

  1. Add those examples to the Readme.md file of a repository and make sure the page/image exists in the repository
Click [here](/docs/somepage.md)

![Image](/docs/cover.png)

[External link](https://designsystem.digital.gov/)
  1. Go to the entity page with the Roadies plugin card of the specific repository entity.
  2. Check for the image: it’ll be rendered as broken.
  3. Click on the Click here link: it’ll send the user to a broken page.
  4. Click on the External link link: it should be opened in a new tab, but it does not. relative-link2

Possible Solution

Context

We are using the GH Insights Roadie plugin to display the Readme file for several entities (components, systems, domains, templates) to encourage our users to go to the docs and find more information.

Your Environment

  • @backstage/plugin-catalog-react version: ^1.8.3
  • @backstage/integration version: ^1.6.2
  • @roadiehq/backstage-plugin-github-insights version: ^2.3.20

renatafaracobah avatar Sep 12 '23 18:09 renatafaracobah

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Nov 11 '23 18:11 github-actions[bot]

unstale, please

ltdonner-bah avatar Nov 13 '23 14:11 ltdonner-bah

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jan 12 '24 14:01 github-actions[bot]

unstale please

ltdonner-bah avatar Jan 12 '24 15:01 ltdonner-bah

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Mar 12 '24 16:03 github-actions[bot]

unstale please

ltdonner-bah avatar Mar 12 '24 16:03 ltdonner-bah

Same problem here:

@backstage/plugin-catalog-react ^1.10.0 @backstage/integration ^1.9.0 @roadiehq/backstage-plugin-github-insights ^2.3.23

thiago-scherrer avatar Apr 02 '24 18:04 thiago-scherrer

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 01 '24 18:06 github-actions[bot]

unstale please & ty

renatafaracobah avatar Jun 03 '24 11:06 renatafaracobah

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Aug 02 '24 11:08 github-actions[bot]