jekyll-seo-tag/lib/template.html

169 lines
4.8 KiB
HTML
Raw Normal View History

2016-02-20 19:26:06 +00:00
<!-- Begin Jekyll SEO tag v{{ seo_tag.version }} -->
2017-04-06 23:02:32 +00:00
{% if seo_tag.title? %}
<title>{{ seo_tag.title }}</title>
2016-02-23 02:31:59 +00:00
{% endif %}
2017-04-06 23:02:32 +00:00
{% if seo_tag.page_title %}
<meta property="og:title" content="{{ seo_tag.page_title }}" />
2015-10-25 21:21:46 +00:00
{% endif %}
2016-02-09 23:33:53 +00:00
2017-04-06 23:02:32 +00:00
{% if seo_tag.author.name %}
<meta name="author" content="{{ seo_tag.author.name }}" />
{% endif %}
2016-02-09 23:33:53 +00:00
2017-04-06 23:02:32 +00:00
<meta property="og:locale" content="{{ seo_tag.page_lang | replace:'-','_' }}" />
2015-10-25 21:21:46 +00:00
2017-04-06 23:02:32 +00:00
{% if seo_tag.description %}
<meta name="description" content="{{ seo_tag.description }}" />
<meta property="og:description" content="{{ seo_tag.description }}" />
2015-10-25 21:21:46 +00:00
{% endif %}
2017-04-06 23:02:32 +00:00
{% if site.url %}
<link rel="canonical" href="{{ page.url | replace:'/index.html','/' | absolute_url }}" />
<meta property="og:url" content="{{ page.url | replace:'/index.html','/' | absolute_url }}" />
2015-10-25 21:21:46 +00:00
{% endif %}
2017-04-06 23:02:32 +00:00
{% if seo_tag.site_title %}
<meta property="og:site_name" content="{{ seo_tag.site_title }}" />
2015-10-25 21:21:46 +00:00
{% endif %}
2017-04-06 23:02:32 +00:00
{% if seo_tag.image %}
<meta property="og:image" content="{{ seo_tag.image.path }}" />
{% if seo_tag.image.height %}
<meta property="og:image:height" content="{{ seo_tag.image.height }}" />
2017-02-16 19:07:35 +00:00
{% endif %}
2017-04-06 23:02:32 +00:00
{% if seo_tag.image.width %}
<meta property="og:image:width" content="{{ seo_tag.image.width }}" />
2016-04-19 13:55:34 +00:00
{% endif %}
{% endif %}
2015-10-25 21:21:46 +00:00
{% if page.date %}
<meta property="og:type" content="article" />
2016-02-03 17:52:46 +00:00
<meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}" />
{% endif %}
2016-02-03 17:52:46 +00:00
{% if paginator.previous_page %}
<link rel="prev" href="{{ paginator.previous_page_path | absolute_url }}">
{% endif %}
{% if paginator.next_page %}
<link rel="next" href="{{ paginator.next_page_path | absolute_url }}">
2015-10-25 21:21:46 +00:00
{% endif %}
{% if site.twitter %}
2017-04-06 23:02:32 +00:00
{% if seo_tag.image %}
<meta name="twitter:card" content="summary_large_image" />
2016-03-05 18:29:49 +00:00
{% else %}
<meta name="twitter:card" content="summary" />
{% endif %}
2016-03-05 20:19:14 +00:00
2015-10-25 21:21:46 +00:00
<meta name="twitter:site" content="@{{ site.twitter.username | replace:"@","" }}" />
2016-02-09 23:33:53 +00:00
2017-04-06 23:02:32 +00:00
{% if seo_tag.author.twitter %}
<meta name="twitter:creator" content="@{{ seo_tag.author.twitter }}" />
2015-10-25 21:21:46 +00:00
{% endif %}
{% endif %}
2016-02-03 17:52:46 +00:00
{% if site.facebook %}
{% if site.facebook.admins %}
<meta property="fb:admins" content="{{ site.facebook.admins }}" />
{% endif %}
{% if site.facebook.publisher %}
<meta property="article:publisher" content="{{ site.facebook.publisher }}" />
{% endif %}
{% if site.facebook.app_id %}
<meta property="fb:app_id" content="{{ site.facebook.app_id }}" />
{% endif %}
2016-02-09 23:33:53 +00:00
{% endif %}
2016-02-09 21:22:28 +00:00
2017-01-13 04:37:53 +00:00
{% if site.webmaster_verifications %}
{% if site.webmaster_verifications.google %}
<meta name="google-site-verification" content="{{ site.webmaster_verifications.google }}">
{% endif %}
2017-04-06 23:02:32 +00:00
2017-01-13 04:37:53 +00:00
{% if site.webmaster_verifications.bing %}
<meta name="msvalidate.01" content="{{ site.webmaster_verifications.bing }}">
{% endif %}
2017-04-06 23:02:32 +00:00
2017-01-13 04:37:53 +00:00
{% if site.webmaster_verifications.alexa %}
<meta name="alexaVerifyID" content="{{ site.webmaster_verifications.alexa }}">
{% endif %}
2017-04-06 23:02:32 +00:00
2017-01-13 04:37:53 +00:00
{% if site.webmaster_verifications.yandex %}
<meta name="yandex-verification" content="{{ site.webmaster_verifications.yandex }}">
{% endif %}
{% elsif site.google_site_verification %}
2016-02-09 21:22:28 +00:00
<meta name="google-site-verification" content="{{ site.google_site_verification }}" />
2016-02-03 17:41:05 +00:00
{% endif %}
2017-01-13 04:37:53 +00:00
2016-02-03 17:41:05 +00:00
2016-02-22 18:35:55 +00:00
<script type="application/ld+json">
{
2016-03-01 16:29:04 +00:00
"@context": "http://schema.org",
2016-02-22 18:35:55 +00:00
2017-04-06 23:02:32 +00:00
{% if seo_tag.type %}
"@type": {{ seo_tag.type | jsonify }},
2016-02-22 18:35:55 +00:00
{% endif %}
2017-04-06 23:02:32 +00:00
{% if seo_tag.name %}
"name": {{ seo_tag.name | jsonify }},
2016-02-22 18:35:55 +00:00
{% endif %}
2017-04-06 23:02:32 +00:00
{% if seo_tag.page_title %}
"headline": {{ seo_tag.page_title | jsonify }},
2016-02-22 18:35:55 +00:00
{% endif %}
2017-04-06 23:02:32 +00:00
{% if seo_tag.author %}
"author": {
2017-04-03 17:36:29 +00:00
"@type": "Person",
2017-04-06 23:02:32 +00:00
"name": {{ seo_tag.author.name | jsonify }}
},
{% endif %}
2017-04-06 23:02:32 +00:00
{% if seo_tag.image %}
"image": {{ seo_tag.image.path | jsonify }},
2016-02-22 18:35:55 +00:00
{% endif %}
{% if page.date %}
"datePublished": {{ page.date | date_to_xmlschema | jsonify }},
{% endif %}
2017-04-06 23:02:32 +00:00
{% if seo_tag.date_modified %}
"dateModified": {{ seo_tag.date_modified | date_to_xmlschema | jsonify }},
{% endif %}
2017-04-06 23:02:32 +00:00
{% if seo_tag.description %}
"description": {{ seo_tag.description | jsonify }},
2016-02-22 18:35:55 +00:00
{% endif %}
2017-04-06 23:02:32 +00:00
{% if seo_tag.logo %}
"publisher": {
"@type": "Organization",
2017-04-06 23:02:32 +00:00
{% if seo_tag.author %}
"name": {{ seo_tag.author.name | jsonify }},
{% endif %}
"logo": {
"@type": "ImageObject",
2017-04-06 23:02:32 +00:00
"url": {{ seo_tag.logo | jsonify }}
}
},
2015-10-25 21:21:46 +00:00
{% endif %}
2017-04-06 23:02:32 +00:00
{% if seo_tag.type == "BlogPosting" or seo_tag.type == "CreativeWork"%}
"mainEntityOfPage": {
2017-04-03 17:36:29 +00:00
"@type": "WebPage",
"@id": {{ page.url | replace:'/index.html','/' | absolute_url | jsonify }}
},
{% endif %}
2017-04-06 23:02:32 +00:00
{% if seo_tag.links %}
"sameAs": {{ seo_tag.links | jsonify }},
2016-02-22 18:35:55 +00:00
{% endif %}
"url": {{ page.url | replace:'/index.html','/' | absolute_url | jsonify }}
2016-02-22 18:35:55 +00:00
}
</script>
2015-10-25 21:21:46 +00:00
<!-- End Jekyll SEO tag -->