User `name` instead of `property` for Twitter
Facebook uses `property`, but `twitter specifies `name`. See https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started#opengraph > Open Graph protocol also specifies the use of property and content attributes for markup (<meta property="og:image" content="http://example.com/ogp.jpg"/>) while Twitter cards use name and content. Or for example the "Sample Code" for the Summary Card https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/summary
This commit is contained in:
parent
93c664bce0
commit
ed5e808ab8
|
@ -54,13 +54,13 @@
|
|||
|
||||
{% if seo_tag.image %}
|
||||
<meta name="twitter:card" content="{{ page.twitter.card | default: site.twitter.card | default: "summary_large_image" }}" />
|
||||
<meta property="twitter:image" content="{{ seo_tag.image.path }}" />
|
||||
<meta name="twitter:image" content="{{ seo_tag.image.path }}" />
|
||||
{% else %}
|
||||
<meta name="twitter:card" content="summary" />
|
||||
{% endif %}
|
||||
|
||||
{% if seo_tag.page_title %}
|
||||
<meta property="twitter:title" content="{{ seo_tag.page_title }}" />
|
||||
<meta name="twitter:title" content="{{ seo_tag.page_title }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if site.twitter %}
|
||||
|
|
Loading…
Reference in New Issue