q-shift / backstage-plugins

Apache License 2.0
3 stars 7 forks source link

Relative link to image don't work anymore when README parent is generated #97

Closed cmoulliard closed 6 months ago

cmoulliard commented 6 months ago

Issue

Relative link to image don't work anymore when README parent is generated

Screenshot 2024-05-03 at 14 40 41

jacobdotcosta commented 6 months ago

This happens because the URL to the image is relative to the location of the markdown file. I think this should work if the link to the file is relative to the repository root. Will make a test.

jacobdotcosta commented 6 months ago

All the links to resources under the repository must have links relative to the repository root, i.e. /.

Check the example on https://github.com/jacobdotcosta/github-workflow-test/ where the image for the "Quarkus Version list - Recommended (field):" label is referring the repository root and is visible both from the root README as well as the plugins/quarkus/README file.

cmoulliard commented 6 months ago

Check the example on https://github.com/jacobdotcosta/github-workflow-test/ where the image for the "Quarkus Version list - Recommended (field):" label is referring the repository root and is visible both from the root README as well as the plugins/quarkus/README file.

That will work at the level of the root - parent README.md file but then the image will not be visible anymore at the level of the plugin, which is also published on npmjs !

jacobdotcosta commented 6 months ago

If you check my example the image is also seen on the README.md file under the quarkus plugin sub-folder.

https://github.com/jacobdotcosta/github-workflow-test/blob/main/plugins/quarkus/README.md

image