docs: fingerprint the README artwork so a replaced image is actually seen - #81
Merged
Merged
Conversation
…seen GitHub rewrites the README's relative image paths to `github.com/bitwize-ai/Logue/raw/main/docs/images/<file>` and serves them with `cache-control: max-age=300`. Replacing an image in place leaves that URL identical, so browsers and the CDN keep painting the copy they already hold. The new picture is live and correct, and everyone who had loaded the page before still sees the old one — with nothing wrong in the repository to find. That is exactly what happened to the home screenshot in #80: `main` carried the right bytes and raw served them, but the front page looked unchanged. Name each image `<name>.<first 8 of sha256>.png`. A URL that has never been requested cannot be served from a stale cache. `docs/images/README.md` records the convention and the rename command, since nothing builds these and the next person to swap a screenshot has to do it by hand.
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.
Follow-up to #80, where the home screenshot went in correctly and the repository front page
went on showing the old one.
What was happening
Nothing was wrong with the merge.
maincarried the right blob, andgithub.com/bitwize-ai/Logue/raw/main/docs/images/home-dashboard.pngserved exactly thosebytes. The problem is that it served them at the same URL as before.
GitHub rewrites the README's relative image paths to that
rawURL and serves them withcache-control: max-age=300. Replacing an image in place changes the bytes behind the URLbut not the URL itself, so browsers and the CDN have no reason to re-request it. Anyone who
had loaded the page before the merge keeps seeing the previous picture, and there is nothing
in the repository to find that would explain it.
Five images in #80 were replaced in place and all five had this problem, not just home.
The change
Every README image is now named
<name>.<first 8 of sha256>.png:A URL that has never been requested cannot be served from a stale cache. This is the same
reason build tools fingerprint asset filenames; the README just has no build step to do it,
so the names are maintained by hand.
Applied to all ten images rather than only the five that were stale — a convention that
covers half the directory is one the next person will not notice exists.
docs/images/README.mdNew, and the reason the convention might survive. It records the rule, the one-line rename
command, and where the sources come from. Worth reading in review, since a half-remembered
convention here fails silently in exactly the way this PR is fixing.
Reviewing this
Every image change is a pure rename —
git diffreports all ten asR, no content touched.The only edits are the ten
srcreferences inREADME.mdand the new note.Verified before pushing: every reference resolves to a file on disk, and no file in
docs/images/is unreferenced.