Skip to content

Instantly share code, notes, and snippets.

@hughker
Created August 7, 2013 17:24
Show Gist options
  • Save hughker/6176309 to your computer and use it in GitHub Desktop.
Save hughker/6176309 to your computer and use it in GitHub Desktop.
<meta charset="utf-8">
<link rel="dns-prefetch" href="//cdn.myshopify.com/">
<link rel="sitemap" type="application/xml" title="Sitemap" href="{{ shop.url }}/sitemap.xml">
{% capture title %}{{ page_title | downcase }}{% endcapture %}
{% if title contains 'contact' %}<meta name="robots" content="noindex">{% endif %}
<link rel="alternate" type="application/atom+xml" title="Atom" href="{{ shop.url }}/blogs/news.atom">
<link rel="alternate" type="application/atom+xml" title="Atom" href="{{ shop.url }}/collections/all.atom">
<link rel="icon" href="{{ 'favicon.ico' | asset_url }}" type="image/x-icon">
<meta property="og:site_name" content="{{ shop.name }}">
{% if template == 'index' %}
<title>{{ shop.name }} | {{ page_title }}</title>
<meta name="title" itemprop="name" content="{{ shop.name }} | {{ page_title }}">
{% elsif template == '404' %}
<title>Page Not Found | {{ shop.name }}</title>
<meta name="title" itemprop="name" content="Page Not Found | {{ shop.name }}">
{% else %}
<title>{{ page_title }} | {{ shop.name }}</title>
<meta name="title" itemprop="name" content="{{ page_title }} | {{ shop.name }}">
{% if template == 'product' %}
<meta property="og:title" content="{{ product.title }}">
<meta property="og:type" content="product">
<meta property="og:url" content="{{ shop.url }}{{ product.url }}">
<meta property="og:image" content="{{ product.featured_image | product_img_url: 'grande' }}">
<meta property="og:site_name" content="{{ shop.name }}">
<meta itemprop="image" content="{{ product.featured_image | product_img_url: 'compact' }}">
<meta itemprop="currency" content="{{ shop.currency }}">
<meta itemprop="seller" content="{{ shop.name }}">
<meta itemprop="availability" content="{% if product.available %}in_stock{% else %}out_of_stock{% endif %}">
{% endif %}
{% endif %}
{% if page_description != '' %}
<meta name="description" itemprop="description" content="{{ page_description }}">
{% endif %}
<link rel="canonical" href="{{ canonical_url }}">
<link rel="author" href="{{ 'humans.txt'| asset_url }}">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment