Skip to content
This repository was archived by the owner on Aug 30, 2018. It is now read-only.

Commit 6f5dc6e

Browse files
committed
Merge pull request #43 from Shopify/pinterest-pins
Pinterest pins
2 parents 419b934 + 11a349a commit 6f5dc6e

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

config/settings.html

+5-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@
3535
<td colspan="2"><small>Social helpers include Facebook Open Graph Tags and Twitter Cards. Enable or disable them here, all of the code is taking care of for you in snippets.</small></td>
3636
</tr>
3737
<tr>
38-
<td><label for="enable_opengraph">Enable <a href="https://developers.facebook.com/docs/opengraph/using-objects/" title="About Facebook Open Graph Objects">Facebook Open Graph Tags</a></label></td>
39-
<td><input type="checkbox" id="enable_opengraph" name="enable_opengraph" /></td>
38+
<td><label for="enable_opengraph">Enable <a href="https://developers.facebook.com/docs/opengraph/using-objects/" title="About Facebook Open Graph Objects">Facebook</a> and <br /><a href="https://developers.pinterest.com/rich_pins/" title="About Pinterest Rich Pins">Pinterest</a> Open Graph tags</label></td>
39+
<td>
40+
<input type="checkbox" id="enable_opengraph" name="enable_opengraph" />
41+
<small>Open Graph tags are used by Facebook and Pinterest to load the appropriate product details when sharing or pinning.</small>
42+
</td>
4043
</tr>
4144
<tr>
4245
<td><label for="enable_twittercards">Enable <a href="https://dev.twitter.com/docs/cards/types/product-card" title="About Twitter Product Cards">Twitter Cards</a></label></td>

snippets/fb-open-graph-tags.liquid

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
{% comment %}
22
3-
Add Facebook Open Graph meta tags to product pages
4-
for friendly Facebook sharing content.
3+
Add Facebook and Pinterest Open Graph meta tags to product pages
4+
for friendly Facebook sharing and Pinterest pinning.
55
66
More info Open Graph meta tags
77
- https://developers.facebook.com/docs/opengraph/using-objects/
8+
- https://developers.pinterest.com/rich_pins/
89
910
Use the Facebook Open Graph Debugger for validation (and cache clearing)
1011
- http://developers.facebook.com/tools/debug
1112
13+
Validate your Pinterest rich pins
14+
- https://developers.pinterest.com/rich_pins/validator/
15+
1216
{% endcomment %}
1317
{% if settings.enable_opengraph %}
1418
{% if template contains 'product' %}

snippets/twitter-card.liquid

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@
1212
1313
{% endcomment %}
1414

15+
{% if settings.enable_twittercards %}
16+
1517
{% comment %}
1618
Twitter user name of the site, based on theme settings
1719
{% endcomment %}
18-
{% if settings.twittercard_handle != blank %}<meta name="twitter:site" content="{{settings.twittercard_handle}}">{% endif %}
20+
{% if settings.twittercard_handle != blank %}
21+
<meta name="twitter:site" content="{{settings.twittercard_handle}}">
22+
{% endif %}
1923
{% if template contains 'product' %}
2024
<meta name="twitter:card" content="product">
2125
<meta name="twitter:title" content="{{ product.title }}">
@@ -47,4 +51,6 @@
4751
<meta property="twitter:image" content="{{ src }}">
4852
{% endif %}
4953
{% endif %}
54+
{% endif %}
55+
5056
{% endif %}

0 commit comments

Comments
 (0)