Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add twitter card markup for PDP #9818

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

oleksify
Copy link
Member

No description provided.

@squash-labs
Copy link

squash-labs bot commented Jan 20, 2020

Manage this branch in Squash

Test this branch here: https://spark-solutionssd-722-twitter-tqa2g.squash.io

@@ -181,6 +181,17 @@ def image_source_set(name)
set.join(', ')
end

def og_image_pdp(product)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DevilCoders this tag is already added via #9809

<% content_for :head do %>
<meta name="twitter:card" content="summary" />
<meta property="og:title" content="<%= @product.name %>" />
<meta property="og:description" content="<%= og_description(@product) %>" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<meta property="og:description" content="<%= og_description(@product) %>" />
<meta property="og:description" content="<%= meta_data.description %>" />

@@ -0,0 +1,6 @@
<% content_for :head do %>
<meta name="twitter:card" content="summary" />
<meta property="og:title" content="<%= @product.name %>" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<meta property="og:title" content="<%= @product.name %>" />
<meta property="og:title" content="<%= title %>" />

<meta name="twitter:card" content="summary" />
<meta property="og:title" content="<%= @product.name %>" />
<meta property="og:description" content="<%= og_description(@product) %>" />
<meta property="og:image" content="<%= og_image_pdp(@product) %>" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<meta property="og:image" content="<%= og_image_pdp(@product) %>" />
<meta property="og:image" content="<%= image_url_path %>" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants