diff --git a/app/views/public/cards/show.html.erb b/app/views/public/cards/show.html.erb index 5728314c4..0fb1a8fc6 100644 --- a/app/views/public/cards/show.html.erb +++ b/app/views/public/cards/show.html.erb @@ -1,7 +1,15 @@ <% @page_title = @card.title %> <% content_for :head do %> - <%= card_social_tags(@card) %> + <%= tag.meta property: "og:title", content: "#{@card.title} | #{@card.board.name}" %> + <%= tag.meta property: "og:description", content: format_excerpt(@card&.description, length: 200) %> + <%= tag.meta property: "og:image", content: @card.image.attached? ? "#{request.base_url}#{url_for(@card.image)}" : "#{request.base_url}/app-icon.png" %> + <%= tag.meta property: "og:url", content: published_card_url(@card) %> + + <%= tag.meta property: "twitter:title", content: "#{@card.title} | #{@card.board.name}" %> + <%= tag.meta property: "twitter:description", content: format_excerpt(@card&.description, length: 200) %> + <%= tag.meta property: "twitter:image", content: @card.image.attached? ? "#{request.base_url}#{url_for(@card.image)}" : "#{request.base_url}/app-icon.png" %> + <%= tag.meta property: "twitter:card", content: "summary_large_image" %> <% end %> <% content_for :header do %>