Serve topic logos from explore-feed.github.com#5158
Merged
Conversation
The topics block was emitting logo URLs as `https://github.com/github/explore/blob/main/...?raw=true`, which github/github's CSP doesn't allow as an img-src on biztools pages (e.g. https://admin.github.com/biztools/topics) — so the logos fail to render. The collections block above already uses `{{ site.url }}` (which is https://explore-feed.github.com per CNAME), and that host is the intended canonical home for these assets. Switch the topics block to the same pattern. The companion CSP allowlist change in github/github adds `explore-feed.github.com` to img-src.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Explore feed JSON so topic logo URLs are served from the canonical Explore feed host (explore-feed.github.com) instead of linking to github.com/.../blob/.../?raw=true, which is blocked by GitHub’s CSP on admin surfaces.
Changes:
- Switch
topics[].logoURL generation infeed.json.liquidto use{{ site.url }}(matching the existing collections image pattern).
Show a summary per file
| File | Description |
|---|---|
feed.json.liquid |
Changes topic logo URLs to be hosted on explore-feed.github.com, aligning with how collection images are emitted. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The topics block in
feed.json.liquidemits logo URLs pointing athttps://github.com/github/explore/blob/main/.../...?raw=true. github/github's CSPimg-srcdoesn't allowgithub.comas an arbitrary image host, so on admin views like https://admin.github.com/biztools/topics the topic logos fail to render.The collections block right above already uses
{{ site.url }}(which ishttps://explore-feed.github.comperCNAME) — switch the topics block to the same pattern so logos are served from the same canonical asset host as collection images.Companion change
A companion PR in
github/githubaddsexplore-feed.github.comto the CSPimg-srcallowlist (alongside the existingcustomer-stories-feed.github.comandspotlights-feed.github.comentries). Either PR can land first — neither host works today.Test plan
https://explore-feed.github.com/feed.jsonand confirm topiclogoURLs are prefixed withhttps://explore-feed.github.com/...(no moregithub.com/.../blob/main/...?raw=true).https://admin.github.com/biztools/topics.