Created
May 11, 2012 16:47
-
-
Save resistorsoftware/2660898 to your computer and use it in GitHub Desktop.
Meta Tagger Blog SEO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if template contains 'blog' %} | |
{% assign mf = blog.metafields.meta_data %} | |
{% unless mf == empty %} | |
{% for mf in blog.metafields.meta_data %} | |
{% capture key %}{{ mf | first }}{% endcapture %} | |
{% if key == 'title' %} | |
<title>{{mf | last}}</title> | |
<meta name="title" content="{{mf | last}}" /> | |
{% endif %} | |
{% if key == 'meta_description' %} | |
<meta name="description" content="{{mf | last}}" /> | |
{% endif %} | |
{% if key == 'keywords' %} | |
<meta name="keywords" content="{{mf | last}}" /> | |
{% endif %} | |
{% endfor %} | |
{% else %} | |
<title>{% if page_title != '' %}{{ page_title | escape }}{% else %}{{ blog.title }} {{ shop.name }}{% endif %}</title> | |
<meta name="description" content="{{ shop.name }} {{ blog.title | escape }} blog" /> | |
{% endunless %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment