Created
April 11, 2015 19:09
-
-
Save nerdburn/39c91f20559bd3abac18 to your computer and use it in GitHub Desktop.
Postach.io - Header Meta
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
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" /> | |
<meta name="mobile-web-app-capable" content="yes"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
<meta name="author" content="{{ site.author }}"> | |
{% if is_home %} | |
<meta name="description" content="{{ site.bio|striptags|e }}"> | |
{% else %} | |
{% if post %} | |
<meta name="description" content="{{ post.content|striptags|truncate(255)|e }}"> | |
{% endif %} | |
{% endif %} | |
<!-- OpenGraph tags --> | |
<meta property="og:site_name" content="{{ site.name }}"> | |
{% if post %} | |
{% if post.type != 'page' %} | |
<meta property="article:published_time" content="{{ post.created_at }}"> | |
{% if post.author.name %} | |
<meta property="article:author" content="{{ post.author.name }}"> | |
{% endif %} | |
{% if post.tags %} | |
{% for tag in post.tags %} | |
<meta property="article:tag" content="{{ tag|format_tag(link=False, humanize=True) }}"> | |
{% endfor %} | |
{% endif %} | |
{% if post.photos %} | |
{% for photo in post.photos %} | |
{% if loop.index == 1 and photo %} | |
<meta property="og:image" content="{{ photo.width_600 }}"> | |
{% endif %} | |
{% endfor %} | |
{% endif %} | |
<meta property="og:type" content="article"> | |
<meta property="og:title" content="{{ post.title }}"> | |
<meta property="og:url" content="{{ site.base_url }}{{ post.permalink }}"> | |
<meta property="og:description" content="{{ post.content|striptags|truncate(255)|e }}"> | |
{% elif post.type == 'page' %} | |
<meta property="og:type" content="article"> | |
<meta property="og:title" content="{{ post.title }}"> | |
<meta property="og:url" content="{{ site.base_url }}{{ post.permalink }}"> | |
<meta property="og:description" content="{{ post.content|striptags|truncate(255)|e }}"> | |
{% endif %} | |
{% else %} | |
<meta property="og:type" content="website"> | |
<meta property="og:title" content="{{ site.name }}"> | |
<meta property="og:url" content="{{ site.base_url }}"> | |
<meta property="og:description" content="{{ site.bio|striptags }}"> | |
{% endif %} | |
<!-- Twitter Cards --> | |
<meta name="twitter:card" content="summary"> | |
<meta name="twitter:site" content="@{{ site.twitter }}"> | |
{% if post %} | |
{% if post.type != 'page' %} | |
<meta name="twitter:title" content="{{ post.title }}"> | |
<meta name="twitter:description" content="{{ post.content|striptags|truncate(255)|e }}..."> | |
{% elif post.type == 'page' %} | |
<meta name="twitter:title" content="{{ post.title }}"> | |
<meta name="twitter:description" content=" {{ post.content|striptags|truncate(255)|e }}..."> | |
{% else %} | |
<meta name="twitter:title" content="{{ site.name }}"> | |
<meta name="twitter:description" content="{{ site.bio|striptags|truncate(255)|e }}..."> | |
{% endif %} | |
{% endif %} | |
<meta name="twitter:creator" content="@{{ site.twitter }}"> | |
<meta name="twitter:domain" content="{{ site.base_url }}"> | |
{% if is_home %} | |
<link rel="canonical" href="{{ site.base_url }}/" /> | |
{% elif post %} | |
<link rel="canonical" href="{{ site.base_url }}{{ post.permalink }}" /> | |
{% else %} | |
{% if pagination %} | |
{% if pagination.next %} | |
<link rel="next" href="{{ site.base_url }}/{{ pagination.next }}" /> | |
{% endif %} | |
{% if pagination.prev %} | |
<link rel="next" href="{{ site.base_url }}/{{ pagination.next }}" /> | |
{% endif %} | |
{% endif %} | |
{% endif %} | |
<!-- RSS feed --> | |
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ site.atom_url }}"> | |
<!-- For older browsers --> | |
<!--[if lt IE 9]> | |
<script src="{{ static('libs/html5shiv/html5shiv.min.js') }}"></script> | |
<![endif]--> | |
<!-- jquery --> | |
<script src="{{ static('libs/jquery/jquery.min.js') }}"></script> | |
<!-- HTML5 audio plugin CSS --> | |
<link href="{{ static('libs/mediaelement/mediaelementplayer.css') }}" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment