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:
Tobias 2021-03-07 20:52:05 +01:00
parent 93c664bce0
commit ed5e808ab8
1 changed files with 2 additions and 2 deletions

View File

@ -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 %}