Repository navigation
Conversation
Generate a 1200x630 share card for every app (its screenshot as an LED dot matrix, with its name, summary and author), plus a card for the home and author pages. Add canonical, Open Graph and Twitter tags to every page, structured data and pre-rendered details to app pages, and a sitemap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
@saltedlolly merge conflicts ! |
…e/app-viewer-social-cards # Conflicts: # app-viewer/generate-apps-json.js # app-viewer/generate-apps-json.test.js
Collaborator
Author
|
@tavdog Fixed. 🙂 |
…unchanged cards - author cards tile the author's most recently updated apps (up to 9), with larger tiles for fewer apps; the home card tiles the most recently updated apps across the catalogue - tiles skip apps marked broken and screenshots that can't be read - author cards have their own hashed file names - --reuse-cards copies cards whose hashed file name is already in a folder of previously published cards instead of drawing them again Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e/app-viewer-social-cards
Tiles only use real display renders with something lit; photos are used only when an author has nothing better, and the logo when they have nothing at all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The deployed copy of index.html is rewritten to point at it, so sharing sites fetch the new card when the recently updated apps change. The source index.html is left alone. Tiled card names now hash only the screenshots' bytes, not their paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… into feature/app-viewer-social-cards
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.
What this adds
Sharing an App Viewer page on Bluesky, Mastodon, X, Discord, Slack and similar now shows a proper preview card, and the pages are easier for search engines to understand.
Examples
App cards:
The home page and author pages tile the most recently updated apps:
Share cards
Every card is a 1200x630 PNG generated during the normal site build, with the Tronbyt logo, "Tronbyt App Viewer", and screenshots drawn as an LED dot matrix, in the Viewer's Press Start 2P font.
index.htmlinto the site before the generator runs, and the generator rewrites that copy to point at the current home card. The sourceindex.htmlkeeps a placeholder name and is never modified, including by local builds intoapp-viewer/.opentype.js), so cards look the same wherever they're built. The font is under the SIL Open Font License, included alongside it.Previously
og:imagepointed at the app's 64x32 screenshot, which is too small for sharing sites to use (most want at least 200-300px) and often an animated WebP.Search
SoftwareApplicationstructured data.sitemap.xmllists every app and author page. As the site lives at/apps, it can't have arobots.txt; the sitemap can be submitted in Google Search Console by someone who controls the tronbyt organisation (see also Suggestion: serve the App Viewer at apps.tronbyt.com #835).Build
No workflow change is required: the generator writes the cards and sitemap into the site, and the existing
npm ciinstallssharpandopentype.js. A full build of the current catalogue draws 1,706 cards (1,106 app, 599 author and the home card) in about 50s locally and adds about 59MB to the site.--no-cardsskips them for quicker local builds.--reuse-cards <folder>copies any card whose hashed file name is already in a folder of previously published cards instead of drawing it again. Rebuilding with the previous build's cards took 1s (every card reused) with identical output. Card names hash only screenshot contents, not file paths, so they don't depend on where the apps were checked out. A separate PR onmainpasses the last deployment's cards to the build, so a typical deploy only draws the cards that changed. Either can merge first: without the option the generator draws everything, and older generators ignore it.Related
The cards made it easy to see which apps have no screenshot or a poor one; those are listed in #823.
Testing
npm test(28 tests): escaping of all generated tags, structured data and pre-rendered content, card file names (app and author), text wrapping and sizing, screenshot scaling, tile grids, tile selection and which screenshots can be tiled, rewriting the home page's card tags, and the sitemap--reuse-cardsproduces byte-identical cards🤖 Generated with Claude Code