Polymer / pwa-helpers

Small helper methods or mixins to help you build web apps.
BSD 3-Clause "New" or "Revised" License
440 stars 48 forks source link

Support creator & site tags for Twitter #12

Closed AndreasGalster closed 6 years ago

AndreasGalster commented 6 years ago

Twitter has a useful feature called creator and tags, which lets you define which account is associated with the twitter card. Perhaps you'd want to add support for this :)?

For reference, see https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/markup

notwaldorf commented 6 years ago

Do you mean this?

<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@username">

If so, the twitter account probably doesn't change across pages, so you only need to declare it once, in the <head> of your page, and don't need to dynamically update it, which is what the updateMetadata function does

AndreasGalster commented 6 years ago

Valid point, closing this :).

Although there's still cases where you would define dynamic tags, for sites that generate different tags because they belong to different authorities, think WordPress, slack, other publicly available SaaS, etc.

notwaldorf commented 6 years ago

If there's some specific tags you're thinking of, please let me know! I am not a metadata expert, so I genuinely don't know any other than the ones we added. I'm not opposed to adding more useful ones at all! :)