Skip to content

Commit 6d05d35

Browse files
authored
Merge pull request #1581 from codidact/art/og-tags
Fix OpenGraph tags
2 parents 2e74190 + afaa022 commit 6d05d35

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/views/layouts/_head.html.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@
6262
<% else %>
6363
<meta name="twitter:card" content="summary" />
6464
<meta name="twitter:creator" content="@CodidactQA" />
65+
<meta property="og:type" content="website" />
66+
<meta property="og:site_name" content="<%= RequestContext.community.name %> - Codidact" />
6567
<meta property="og:url" content="<%= request.original_url %>" />
6668
<meta property="og:title" content="<%= page_title %>" />
6769
<meta property="og:description" content="<%= content_for?(:description) ? content_for(:description) : desc %>" />
68-
<meta property="og:image" content="<%= "https://#{RequestContext.community.host}#{SiteSetting['SiteLogoPath']}" %>" />
70+
<meta property="og:image" content="<%= "#{SiteSetting['SiteLogoPath']}" %>" />
6971
<% end %>

app/views/posts/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<meta property="og:url" content="<%= post_url(@post) %>" />
1515
<meta property="og:title" content="<%= @post.title %>" />
1616
<meta property="og:description" content="<%= @post.body_plain[0..150].strip %>..." />
17-
<meta property="og:image" content="<%= "https://#{RequestContext.community.host}#{SiteSetting['SiteLogoPath']}" %>" />
17+
<meta property="og:image" content="<%= "#{SiteSetting['SiteLogoPath']}" %>" />
1818
<% end %>
1919

2020
<%= render 'posts/expanded', post: @post, float_notice: false %>

0 commit comments

Comments
 (0)