Repository navigation
Use each outlet's own article image as the news thumbnail - #8
Merged
Merged
Conversation
added 3 commits
August 28, 2026 14:37
The thumbnails were pictures from our own gallery, chosen to suit each story.
They looked fine, but they were not what the article showed, so a reader
scanning the list was matching our photograph to someone else's headline.
Each item now carries the picture the outlet actually ran: the CUHK release's
featured photo of Yen Joe and Liu Min with the study posters, SCMP's seismograph
trace, HK01's briefing shot in front of the seismometer slides, the Croucher
stage photograph, the HKEJ portrait, the CUHKUPDates feature image.
These belong to whoever published them, so `imageCredit` is now a field and it
prints under the thumbnail. Two notes on it:
- It is on the page, not in a title attribute. A credit nobody can see is
not a credit.
- It stays short. Spelling out "CUHK Communications and Public Relations
Office" stacked into a four-line column under the 88px mobile thumbnail,
and the row already names the outlet beside it.
The SCMP picture is credited to Shutterstock rather than to SCMP, because
their own caption says so — the outlet licensed it, and the agency is the
owner worth naming.
Also documents `image`, `imageAlt` and `imageCredit` in the template and in
ADD-NEWS.md. They went into the schema last time but never into either, so the
people the template exists for had no way to learn a picture was even possible.
The map's colours were changed through the GitHub web editor, which does not run Prettier, so main has been failing its formatting check since. This is whitespace only: the script tag's attributes fit on one line. The edit itself is left exactly as made, including dropping `async` from the script tag — that looks deliberate and is not mine to revert.
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.
The thumbnails added last week were pictures from our own gallery, chosen to suit
each story. They looked fine, but they were not what the article showed — a reader
scanning the list was matching our photograph to someone else's headline.
Each item now carries the picture the outlet actually ran.
Credits
These pictures belong to whoever published them, so
imageCreditis now a fieldand it prints under the thumbnail. Two decisions in there:
titleattribute. A credit nobody can see isnot a credit.
Relations Office" and it stacked into a four-line column under the 88px mobile
thumbnail. The row already names the outlet beside it.
The SCMP picture is credited to Shutterstock, not to SCMP — their own caption
says so, meaning the outlet licensed it from an agency. Of the six, that is the
one where we have no plausible claim: the other five come from CUHK's own offices
or from outlets that photographed Yen Joe directly. It is also the most
replaceable, being stock imagery rather than a picture of the lab. Happy to drop
it if you would rather not carry it.
Documentation
imageandimageAltwent into the schema last time but never into_template.mdordocs/ADD-NEWS.md, so the people the template exists for hadno way to learn a picture was even possible. All three fields are documented now,
including that dense multi-panel figures turn to mush at thumbnail size and that
anything not ours needs a credit.
Verification
astro check0 errors; token contrast audit passes; Prettier cleanwidths × 2 themes (112 checks)
requirement for small text
/news100 / 100 / 100 / 100, CLS 0 — and the page gotlighter, 144 KB from 157 KB, because photographs compress better than the
figures they replaced
pages, so nothing is orphaned