Repository navigation
docs: replace plugin README screenshots with links to the docs - #35220
MatheusMartinho wants to merge 12 commits into
Conversation
The screenshots in these READMEs were linked with repository-relative paths, so they only resolve when browsing the repository on GitHub. The same files are rendered on the API reference site and on npm, where the paths do not resolve and the images are broken. Fixes backstage#35195 Signed-off-by: MatheusMartinho <[email protected]>
Changed Packages
|
|  | ||
|  | ||
|  | ||
|  |
There was a problem hiding this comment.
Question: What happens if github or the connection to the Internet goes down?
There was a problem hiding this comment.
Great question — and by coincidence I got to answer it empirically rather than hypothetically: GitHub had an availability incident today (raw.githubusercontent.com intermittently serving 429/503, https://www.githubstatus.com incident started 13:40 UTC), so I could watch each render target fail live while re-verifying this.
Per place these READMEs are rendered:
- github.com — relative paths are already served from GitHub's own infrastructure, and if GitHub is down the README page itself is unreachable. No change in failure domain either way.
- npmjs.com — a correction to my PR description here: npm was not actually broken. npm rewrites relative image paths correctly, including the monorepo directory (it uses
repository.directory): the live page for@backstage/plugin-api-docsserveshttps://raw.githubusercontent.com/backstage/backstage/HEAD/plugins/api-docs/docs/api_list.png, which resolves fine when GitHub is healthy. So the npm screenshots already come from raw.githubusercontent.com today — during this afternoon's incident I watched them 503 on the npm page with the current, relative-path READMEs. This PR neither helps nor hurts npm; my "broken in the other two" claim was wrong for npm and I've amended the description. - backstage.io/api (what Broken images in api docs #35195 actually reported) — the only renderer that is genuinely broken, and it's broken deterministically, not just during outages: the generated pages pass
./docs/api_list.pngthrough verbatim, so it resolves tohttps://backstage.io/api/stable/modules/docs/api_list.png→ 404 (that's backstage.io's own 404, unrelated to GitHub health).
So, answering directly: if GitHub or the connection is down, the screenshots degrade to broken-image icons on backstage.io and npm — which is npm's existing behaviour in that situation, and strictly better than backstage.io's current permanent broken state. The one genuine regression is offline preview of a local clone in an editor (relative paths render there; URLs won't). The published tarballs only ship dist/, so READMEs read out of node_modules never had the images either way.
That said, your question points at the sturdier fix: since the API reference is the only rendering that's actually broken, this could be solved in the docs build instead — have the package-docs generation (packages/repo-tools) rewrite the relative paths or copy the referenced assets so backstage.io serves them itself, and leave the READMEs relative. That removes any render-time dependency on GitHub. I'm happy to redo this PR in that direction if you prefer it over hotlinking raw.githubusercontent.com — just say which way you'd like to go.
There was a problem hiding this comment.
And if my internet (or GitHub) goes down, my machine trying to render the markdown also falls over when the files are on disk. Offline development is great + saving bandwidth is good for the enviroment.
That said, your question points at the sturdier fix: since the API reference is the only rendering that's actually broken, this could be solved in the docs build instead — have the package-docs generation (packages/repo-tools) rewrite the relative paths or copy the referenced assets so backstage.io serves them itself, and leave the READMEs relative. That removes any render-time dependency on GitHub. I'm happy to redo this PR in that direction if you prefer it over hotlinking raw.githubusercontent.com — just say which way you'd like to go.
This feels like the play (n.b. not a contributor but think this'd be preferred too).
There was a problem hiding this comment.
Agreed on the offline point — previewing a local clone is the one place the URL approach genuinely regresses, and it's fair to weigh it. (Small caveat: it only applies to a checkout of this repo; the published packages ship only dist/, so a README rendered out of node_modules never had the images either way.)
Since the docs-build route is a bigger change — it touches the packages/repo-tools package-docs generation rather than five READMEs — I'd like a maintainer's direction before rewriting the PR. @awanlin, you triaged #35195: would you prefer
- (a) this PR as-is — absolute URLs, minimal diff, but backstage.io hotlinks raw.githubusercontent.com at view time; or
- (b) I rework it so the docs build rewrites the relative paths / copies the referenced assets and the READMEs stay relative — no render-time GitHub dependency, offline preview keeps working, at the cost of a docs-pipeline change?
Happy to do either — just don't want to build (b) speculatively if (a) is acceptable.
There was a problem hiding this comment.
This seems like a very odd hypothetical and not something we ever really consider. The docs are hosted on the internet, if you have no connection you can't access any of the generated docs.
The solution for this should be simple. Do these images actually provide value? In the context of the API docs not at all, the fact that the README files get included is nice but it's not the surface area we ideally want people to use for this information - that would be in the main docs. We really prefer to have this type of README documentation in the main docs so that might be the correct solution.
|
For reference while the (a)/(b) question above is pending — this is what a user currently sees on https://backstage.io/api/stable/modules/_backstage_plugin-api-docs.html (captured today): all three README screenshots come up broken, exactly as reported in #35195.
|
|
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
|
@awanlin that's a fair point, and I think it actually answers the question I left open above. If the screenshots add no value in the API docs, then the smaller and more correct fix is to stop shipping them there, rather than repointing them to absolute URLs that then have to be maintained. I'm happy to switch this PR to that instead: drop the three screenshots from the package READMEs and leave that content in the main docs, which is where you said you'd prefer it to live. That still closes #35195, and it removes the broken images without adding anything new to maintain. So, whichever you prefer: (a) keep this PR as is, absolute URLs; or Say the word and I'll push (b) today. Not stale on my side, I was only waiting on that call. |
|
@awanlin gentle ping on the (a)/(b) question above. Since you mentioned the screenshots don't add much in the API docs, I'm leaning towards (b). Happy to push it as soon as you confirm, or keep (a) if you'd rather. |
awanlin
left a comment
There was a problem hiding this comment.
Left comments for what to do for each file. I was really going to just close this, I dug around our GA stats and we got 3 views on these pages from the API docs so this is very much not something most people run into. As you've put time towards this @MatheusMartinho I felt we should see it though. 🙏
There was a problem hiding this comment.
The images for this can be moved to be part of the docs here: https://backstage.io/docs/features/software-catalog/#unprocessed-entities
There was a problem hiding this comment.
Validate that this is the same from here, likely is: https://backstage.io/docs/getting-started/register-a-component. If it is we can remove it from here.
There was a problem hiding this comment.
I'm fine with the images here being broken. These images have value as they are not documented anywhere and it's pretty rare people are looking at the API docs for this plugin.
There was a problem hiding this comment.
We can remove the images here, these can been seen in various spots in the docs.
There was a problem hiding this comment.
These images can be removed. As a fallback feel free to add links to the demo site: https://demo.backstage.io/api-docs?filters%5Bkind%5D=api&filters%5Buser%5D=all
Signed-off-by: Matheus Moura Martinho <[email protected]>
The screenshots only loaded when browsing the repository on GitHub. The pages they showed are covered elsewhere in the Backstage documentation. Signed-off-by: Matheus Moura Martinho <[email protected]>
Keep the original relative paths, as requested in review. Signed-off-by: Matheus Moura Martinho <[email protected]>
The screenshots only loaded when browsing the repository on GitHub. The demo site shows the same pages live. Signed-off-by: Matheus Moura Martinho <[email protected]>
…of the README screenshot The screenshot showed the same wizard that the guide walks through step by step. Signed-off-by: Matheus Moura Martinho <[email protected]>
The screenshots move to the Unprocessed Entities section of the software catalog docs. Signed-off-by: Matheus Moura Martinho <[email protected]>
Moved from the catalog-unprocessed-entities plugin README, as suggested in review. Signed-off-by: Matheus Moura Martinho <[email protected]>
Signed-off-by: Matheus Moura Martinho <[email protected]>
|
Thanks for the contribution! |
…o the docs Moved from plugins/catalog-unprocessed-entities/docs, as suggested in review. Signed-off-by: Matheus Moura Martinho <[email protected]>
The README now links to the Registering a Component guide, which shows the same wizard. Signed-off-by: Matheus Moura Martinho <[email protected]>
f592554 to
61bd89f
Compare
|
Thanks for digging into the numbers, @awanlin, and for giving this a go anyway. I reworked it file by file as you suggested:
I also merged master to clear the conflict in the org README and updated the changeset. Ready for another look whenever you have time. |
|
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the documentation and screenshot-link updates.
No open issues 🎉
What changed in this PR
Addresses #35195 by removing repository-relative screenshots that break when plugin READMEs are rendered in Backstage’s API reference.
Changes:
- Replaces screenshots with documentation or demo links where appropriate, and removes screenshots from the Org README.
- Adds Unprocessed Entities screenshots to the software catalog documentation.
- Includes a patch changeset for the four affected plugin packages.
| File | Description |
|---|---|
plugins/org/README.md |
Removes screenshots while retaining installation and usage guidance. |
plugins/catalog-unprocessed-entities/README.md |
Replaces screenshots with a link to the software catalog documentation. |
plugins/catalog-import/README.md |
Links to the component-registration walkthrough instead of a screenshot. |
plugins/api-docs/README.md |
Replaces screenshots with a Backstage demo-site link. |
docs/features/software-catalog/index.md |
Adds screenshots of failed, pending, and raw entity views. |
.changeset/silver-pugs-argue.md |
Records the documentation updates for all four affected plugins. |
Review effort: Balanced
awanlin
left a comment
There was a problem hiding this comment.
Hi @MatheusMartinho, this was ready to go but it now has conflicts with master. Since this was approved, the Unprocessed Entities docs were moved to their own page (docs/features/software-catalog/unprocessed-entities.md), screenshots included, and the plugin README was slimmed down to a link, so that part of this PR is now covered.
Could you merge master into your branch (or rebase) and:
- Take master's version of
docs/features/software-catalog/index.mdandplugins/catalog-unprocessed-entities/README.mdwhen resolving the conflicts. - Update the changeset to drop
@backstage/plugin-catalog-unprocessed-entitiesand the sentence about moving its screenshots. - Optionally, delete the now unused PNGs in
plugins/org/docs/, like you did for catalog-import.
The api-docs, catalog-import and org README changes are still good, so once that's done I'll get this merged. Thanks!


Hey, I just made a Pull Request!
Fixes #35195.
The plugin READMEs are also rendered on the API reference at backstage.io, where repository-relative image paths do not resolve, so the screenshots showed up as broken images (#35195).
Following the review, each README is handled on its own instead of pointing every image at raw.githubusercontent.com:
api-docs: removed the screenshots and linked to the demo site.catalog-import: removed the screenshot and the now unused image, and linked to Registering a Component, which walks through the same wizard.catalog-unprocessed-entities: moved the three screenshots into the Unprocessed Entities section of the software catalog docs, and the README now links there.devtools: left unchanged.org: removed the screenshots.The
api-docsandorgimage files stay in place, since theirREADME-alpha.mdfiles still use them.✔️ Checklist
Signed-off-byline in the message. (more info)