Skip to content

Commit 4904dfb

Browse files
authored
Merge pull request #1770 from basecamp/og-update
Opengraph update
2 parents cbfe0b7 + 0fc3ed5 commit 4904dfb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

app/helpers/cards_helper.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ def card_drafted_or_added(card)
3939

4040
def card_social_tags(card)
4141
tag.meta(property: "og:title", content: "#{card.title} | #{card.board.name}") +
42-
tag.meta(property: "og:description", content: format_excerpt(@card&.description, length: 200)) +
43-
tag.meta(property: "og:image", content: @card.image.attached? ? "#{request.base_url}#{url_for(@card.image)}" : "#{request.base_url}/app-icon.png") +
44-
tag.meta(property: "og:url", content: card_url(@card))
42+
tag.meta(property: "og:description", content: format_excerpt(card&.description, length: 200)) +
43+
tag.meta(property: "og:image", content: card.image.attached? ? "#{request.base_url}#{url_for(card.image)}" : "#{request.base_url}/opengraph.png") +
44+
tag.meta(property: "og:url", content: card_url(card))
4545
end
4646

4747
def button_to_remove_card_image(card)

app/views/public/boards/show.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<% content_for :head do %>
44
<%= tag.meta property: "og:title", content: "#{@board.name} | #{Current.account.name}" %>
55
<%= tag.meta property: "og:description", content: format_excerpt(@board&.public_description, length: 200) %>
6-
<%= tag.meta property: "og:image", content: "#{request.base_url}/app-icon.png" %>
6+
<%= tag.meta property: "og:image", content: "#{request.base_url}/opengraph.png" %>
77
<%= tag.meta property: "og:url", content: published_board_url(@board) %>
88

99
<%= tag.meta property: "twitter:title", content: "#{@board.name} | #{Current.account.name}" %>
1010
<%= tag.meta property: "twitter:description", content: format_excerpt(@board&.public_description, length: 200) %>
11-
<%= tag.meta property: "twitter:image", content: "#{request.base_url}/app-icon.png" %>
11+
<%= tag.meta property: "twitter:image", content: "#{request.base_url}/opengraph.png" %>
1212
<%= tag.meta property: "twitter:card", content: "summary_large_image" %>
1313
<% end %>
1414

public/opengraph.png

146 KB
Loading

0 commit comments

Comments
 (0)