modify meta tag according to the twitter doc to return large images (#8858)
This commit is contained in:
parent
d25a506b6d
commit
463cd07597
1 changed files with 3 additions and 2 deletions
|
|
@ -12,6 +12,7 @@
|
|||
<meta property="og:title" content="Discussion of <%= @commentable.title %>" />
|
||||
<meta property="og:description" content="<%= @commentable.description || "#{community_name} Comment" %>" />
|
||||
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
||||
<meta name="twitter:creator" content="@<%= @user.twitter_username %>">
|
||||
<meta name="twitter:title" content="<%= @commentable.title %>">
|
||||
|
|
@ -23,7 +24,7 @@
|
|||
<meta property="og:title" content="<%= truncate(strip_tags(@root_comment.processed_html), length: 50) %> — <%= community_name %>" />
|
||||
<meta name="twitter:title" content="<%= truncate(strip_tags(@root_comment.processed_html), length: 50) %> — <%= community_name %>">
|
||||
<meta property="og:image" content="<%= comment_social_image_url(@root_comment) %>" />
|
||||
<meta name="twitter:image:src" content="<%= comment_social_image_url(@root_comment) %>">
|
||||
<meta name="twitter:image" content="<%= comment_social_image_url(@root_comment) %>">
|
||||
<% else %>
|
||||
<link rel="canonical" href="<%= app_url("#{@commentable.path}/comments") %>" />
|
||||
<meta property="og:url" content="<%= app_url("#{@commentable.path}/comments") %>" />
|
||||
|
|
@ -31,7 +32,7 @@
|
|||
<meta name="twitter:title" content="[Discussion] <%= @commentable.title %> — <%= community_name %>">
|
||||
<% if @commentable.class.name == "Article" && @commentable.published %>
|
||||
<meta property="og:image" content="<%= article_social_image_url(@commentable) %>" />
|
||||
<meta name="twitter:image:src" content="<%= article_social_image_url(@commentable) %>">
|
||||
<meta name="twitter:image" content="<%= article_social_image_url(@commentable) %>">
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue