inputlogic / pwa-starter

A starting point for Preact based PWAs (WIP)
MIT License
3 stars 0 forks source link

Default meta tags for social sharing #67

Closed staydecent closed 4 years ago

staydecent commented 4 years ago

https://css-tricks.com/essential-meta-tags-social-media/

Use helmet.

weslord commented 4 years ago

We need to take care to do this in a way that forgetting to change the placeholder code doesn't result in worse preview cards than Facebook etc would generate for a site with no meta tags.

staydecent commented 4 years ago

I don't know what facebook generates by default.. Do you have any suggestions?

Are you saying the default meta tags should be commented out so that devs on a new project have to explicitly set them? @weslord

weslord commented 4 years ago

Facebook does something along the lines of using the title tag for the link text, and any big unique image for the thumbnail. It's not always ideal, but it's better than (accidentally) having some random placeholder image and the text "PWA Starter Example" because a dev didn't know to change anything.

What makes these tags particularly vulnerable to this kind of oversight, is that it would never come up as part of our normal testing process, and even the client wouldn't necessarily notice if it's happening for their users deep inside Facebook or Twitter. It's one of the more invisible possible oversights.

Commented out by default is one possible way to make things much safer for everyone, probably the simplest solution. Depends on implementation, too, like if you're pulling all the info from the CMS for the CMS app, it's less of a concern.