96 lines
3.9 KiB
HTML
96 lines
3.9 KiB
HTML
<meta charset='utf-8'>
|
|
|
|
{%comment%}<!-- set the base -->{%endcomment%}
|
|
{% assign base = '' %}
|
|
{% assign depth = page.url | split: '/' | size | minus: 1 %}
|
|
<meta property='page:depth' content='{{depth}}'>
|
|
{% if depth <= 1 %}{% assign base = '.' %}
|
|
{% elsif depth == 2 %}{% assign base = '..' %}
|
|
{% elsif depth == 3 %}{% assign base = '../..' %}
|
|
{% elsif depth == 4 %}{% assign base = '../../..' %}{% endif %}
|
|
{% assign timestamp = site.time | date: "%Y%m%d%H%M%S" %}
|
|
|
|
{%comment%}<!-- title -->{%endcomment%}
|
|
{% if page.full_title %}
|
|
<title>{{ page.full_title }}</title>
|
|
<meta content='{{ page.full_title }}' property='og:title'>
|
|
<meta content='{{ page.full_title }}' property='twitter:title'>
|
|
<meta content='article' property='og:type'>
|
|
{% elsif page.title %}
|
|
<title>{{ page.title }} cheatsheet</title>
|
|
<meta content='{{ page.title }}' property='og:title'>
|
|
<meta content='{{ page.title }}' property='twitter:title'>
|
|
<meta content='{{ page.og_type | default: "article" }}' property='og:type'>
|
|
{% else %}
|
|
<title>{{ site.title }}</title>
|
|
<meta content='{{ site.title }}' property='og:title'>
|
|
<meta content='{{ site.title }}' property='twitter:title'>
|
|
<meta content='{{ page.og_type | default: "website" }}' property='og:type'>
|
|
{% endif %}
|
|
|
|
{%comment%}<!-- description -->{%endcomment%}
|
|
{% if page.description %}
|
|
<meta content="{{ page.description }}" name="description">
|
|
<meta content="{{ page.description }}" property="og:description">
|
|
{% endif %}
|
|
|
|
{%comment%}<!-- canonical URL -->{%endcomment%}
|
|
{% if page.url != '/index.html' %}
|
|
<link rel="canonical" href="{{ site.url }}{{ page.url | remove: '.html' }}">
|
|
<meta name="og:url" content="{{ site.url }}{{ page.url | remove: '.html' }}">
|
|
<link rel="prefetch" href="{{ site.url }}">
|
|
<link rel="prerender" href="{{ site.url }}">
|
|
{% endif %}
|
|
|
|
{%comment%}<!-- author -->{%endcomment%}
|
|
{% if page.author %}
|
|
{% for author in site.authors | where: "name", page.author %}
|
|
<meta content='{{ author.name }}' name='author'>
|
|
{% if author.ogp %}
|
|
<meta content='{{ author.ogp }}' property='article:author'>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{%comment%}<!-- site name -->{%endcomment%}
|
|
{% if site.title %}
|
|
<meta content='{{ site.title }}' property='og:site_name'>
|
|
{% endif %}
|
|
|
|
{%comment%}<!-- facebook -->{%endcomment%}
|
|
{% if site.facebook.app_id %}
|
|
<meta content='{{ site.facebook.app_id }}' property='fb:app_id'>
|
|
{% endif %}
|
|
{% if site.facebook.admin %}
|
|
<meta content='{{ site.facebook.admin }}' property='fb:admins'>
|
|
{% endif %}
|
|
|
|
{%comment%}<!-- page meta -->{%endcomment%}
|
|
{% if page.date %}
|
|
<meta content='{{ page.date | date: "%Y-%m-%d" }}' property='article:published_date'>
|
|
{% endif %}
|
|
{% if page.image %}
|
|
<meta content='{{ page.image }}' property='og:image'>
|
|
<meta content='{{ page.image }}' name='twitter:image'>
|
|
{% endif %}
|
|
|
|
{%comment%}<!-- tags -->{%endcomment%}
|
|
{% if page.category %}
|
|
<meta content='{{ page.category }}' property='article:section'>
|
|
{% endif %}
|
|
{% if page.tags %}
|
|
{% for tag in page.tags %}
|
|
<meta content='{{ tag }}' property='article:tag'>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{%comment%}<!-- google analytics -->{%endcomment%}
|
|
{% if site.data.google_analytics.enabled %}<script>if(~location.hostname.indexOf("{{site.data.google_analytics.hostname}}")){var _gaq=_gaq||[];_gaq.push(["_setAccount","{{ site.data.google_analytics.id }}"]);_gaq.push(["_trackPageview"]);(function(){var ga=document.createElement("script");ga.async=true;ga.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga,s)})()}</script>{% endif %}
|
|
|
|
<meta content='IE=edge' http-equiv='X-UA-Compatible'>
|
|
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
|
|
<link href='{{ base }}/assets/favicon.png' rel='shortcut icon'>
|
|
|
|
{%comment%}<!-- fouc -->{%endcomment%}
|
|
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
|