Closed abdonrd closed 5 years ago
About this: https://github.com/Polymer/pwa-helpers/pull/47#issuecomment-437193056
Why not have Twitter-specific when it is so common in applications?
My thinking with this and themeColor (#52) is this:
summary
card), then a static meta tag in index.html would be better than requiring JavaScript to be run (remember that opengraph tags are only useful if the crawler runs JS or the server pre-render's it).updateLocation()
callback. You might even want to set other Twitter-specific meta tags that we don't support._setMeta
function (renamed of course), then you can set whatever meta tags.My use case is:
twitter:card
depending of the page. I have summary
as default, but I want to use summary_large_image
in some pages. I do it at the same time I change the other metadata stuff.theme-color
when the user is offline.And what updateLocation()
callback?
Perhaps it'd be useful if we exported the _setMeta function (renamed of course), then you can set whatever meta tags.
I think that's really the best option here.
Added setMetaTag()
to set arbitrary meta tag in #58
Option to update the
theme-color
meta tag.<meta name="twitter-card" content="summary">
Reference: https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/summary
Just check https://github.com/Polymer/pwa-helpers/commit/a4b56fd048cac57931e1aa7c76524687c502af9a. When https://github.com/Polymer/pwa-helpers/pull/47 is merged, I can rebase it to master.