Feat/example viewer - #7
Merged
Merged
Conversation
The demo site linked nowhere. Someone who likes what they see there had no way to reach the package or the source without going back to wherever they came from — which is the one moment they are most likely to install it. The masthead now carries npm, GitHub and StackBlitz links plus the install command. The workspace readme gets the same three links and a version badge. The library's own package.json already declared repository, homepage and bugs, so the npm page sidebar was fine; this is about the two places a visitor actually lands.
Pasting the demo URL into LinkedIn or Discord showed nothing — no title, no description, no image. The page had a <title> of "Demo" and no Open Graph tags at all, so there was nothing for a scraper to read. Adds the full set: description, og:type/url/title/description/image with dimensions and alt text, twitter:card as summary_large_image, and a canonical link. Plus a 1200x630 preview image. og:image has to be an absolute URL — a relative one is ignored silently, which is the same failure as having no tag. The deployed origin is not known until deploy time, so the source carries a __SITE_URL__ placeholder and a postbuild step fills it in from VERCEL_PROJECT_PRODUCTION_URL, which Vercel documents as always set, even on previews, precisely so OG image URLs can point at production. Builds outside Vercel fall back to the default domain. The script exits non-zero if it finds no placeholders, so the tags going missing fails the build rather than quietly shipping an unpreviewable page. Verified: 5 placeholders replaced, absolute URLs in the built HTML, og.png served at the site root at 1200x630, and the substitution re-checked with the Vercel variable set.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
No description provided.