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

Commit

Permalink
Merge pull request #43 from Shopify/pinterest-pins
Browse files Browse the repository at this point in the history
Pinterest pins
  • Loading branch information
cshold committed Apr 16, 2014
2 parents 419b934 + 11a349a commit 6f5dc6e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
7 changes: 5 additions & 2 deletions config/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@
<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>
</tr>
<tr>
<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>
<td><input type="checkbox" id="enable_opengraph" name="enable_opengraph" /></td>
<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>
<td>
<input type="checkbox" id="enable_opengraph" name="enable_opengraph" />
<small>Open Graph tags are used by Facebook and Pinterest to load the appropriate product details when sharing or pinning.</small>
</td>
</tr>
<tr>
<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>
Expand Down
8 changes: 6 additions & 2 deletions snippets/fb-open-graph-tags.liquid
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{% comment %}
Add Facebook Open Graph meta tags to product pages
for friendly Facebook sharing content.
Add Facebook and Pinterest Open Graph meta tags to product pages
for friendly Facebook sharing and Pinterest pinning.
More info Open Graph meta tags
- https://developers.facebook.com/docs/opengraph/using-objects/
- https://developers.pinterest.com/rich_pins/
Use the Facebook Open Graph Debugger for validation (and cache clearing)
- http://developers.facebook.com/tools/debug
Validate your Pinterest rich pins
- https://developers.pinterest.com/rich_pins/validator/
{% endcomment %}
{% if settings.enable_opengraph %}
{% if template contains 'product' %}
Expand Down
8 changes: 7 additions & 1 deletion snippets/twitter-card.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
{% endcomment %}

{% if settings.enable_twittercards %}

{% comment %}
Twitter user name of the site, based on theme settings
{% endcomment %}
{% if settings.twittercard_handle != blank %}<meta name="twitter:site" content="{{settings.twittercard_handle}}">{% endif %}
{% if settings.twittercard_handle != blank %}
<meta name="twitter:site" content="{{settings.twittercard_handle}}">
{% endif %}
{% if template contains 'product' %}
<meta name="twitter:card" content="product">
<meta name="twitter:title" content="{{ product.title }}">
Expand Down Expand Up @@ -47,4 +51,6 @@
<meta property="twitter:image" content="{{ src }}">
{% endif %}
{% endif %}
{% endif %}

{% endif %}

0 comments on commit 6f5dc6e

Please sign in to comment.