Repository navigation
Add a link preview image to the showcase - #211
Merged
Merged
Conversation
A link to the page showed only a title and a description, with an empty image box. The page now has Open Graph and Twitter card tags with an absolute URL for a 1200 x 630 image, a canonical link and PNG icons. The build copies those files from public/ (a small webpack plugin, no new dependency).
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
A link to https://tbolis.github.io/react-sketch/ shows a title and a description in Slack, with an empty image box. The page has no Open Graph or Twitter card tags, so there is no image to show.
og:*andtwitter:*tags, with an absolute URL forog-image.png(1200 x 630, 59 KB: the brush of the logo, the title and a line of description),summary_large_image, a canonical link, and the size and alt text of the image.favicon-32.pngandapple-touch-icon.pngnext tofavicon.ico.webpack.config.jscopies those three files frompackages/showcase/publicto the build with a small plugin (no new dependency), and passes the address of the deployment (siteUrl) to the template.1.1.0Added list, saying it is about the showcase.The workflow deploys on pushes to
masterthat changepackages/**(not markdown), so merging this deploys it.Verification
yarn lintand the Prettier check pass. The build emits the three files and the tags, and the build served under/react-sketch/returns 200 for each of them, with anog-image.pngidentical to the one inpublic/.Notes
https://tbolis.github.io/react-sketch/?v=2, or ask Slack to refresh it, to see the new one.