118 lines
3.6 KiB
HTML
118 lines
3.6 KiB
HTML
|
<!-- Begin Jekyll SEO tag -->
|
||
|
|
||
|
{% if site.url %}
|
||
|
{% assign seo_url = site.url %}
|
||
|
{% elsif site.github.url %}
|
||
|
{% assign seo_url = site.github.url %}
|
||
|
{% endif %}
|
||
|
|
||
|
{% if page.title %}
|
||
|
{% assign seo_title = page.title %}
|
||
|
{% if site.title %}
|
||
|
{% assign seo_title = seo_title | append:" - " | append: site.title %}
|
||
|
{% endif %}
|
||
|
{% elsif site.title %}
|
||
|
{% assign seo_title = site.title %}
|
||
|
{% endif %}
|
||
|
{% if seo_title %}
|
||
|
{% assign seo_title = seo_title | escape | markdownify | strip_html | strip_newlines %}
|
||
|
{% endif %}
|
||
|
|
||
|
{% if page.description %}
|
||
|
{% assign seo_description = page.description %}
|
||
|
{% elsif site.description %}
|
||
|
{% assign seo_description = site.description %}
|
||
|
{% endif %}
|
||
|
{% if seo_description %}
|
||
|
{% assign seo_description = seo_description | escape | markdownify | strip_html | strip_newlines %}
|
||
|
{% endif %}
|
||
|
|
||
|
{% if seo_title %}
|
||
|
<title>{{ seo_title }}</title>
|
||
|
<meta property="og:title" content="{{ seo_title }}" />
|
||
|
{% endif %}
|
||
|
|
||
|
{% if seo_description %}
|
||
|
<meta name="description" content="{{ seo_description }}" />
|
||
|
<meta property='og:description' content="{{ seo_description }}" />
|
||
|
{% endif %}
|
||
|
|
||
|
{% if seo_url %}
|
||
|
<link rel="canonical" href="{{ seo_url }}{{ page.url }}" itemprop="url" />
|
||
|
<meta property='og:url' content='{{ seo_url }}{{ page.url }}' />
|
||
|
{% endif %}
|
||
|
|
||
|
{% if site.title %}
|
||
|
<meta property="og:site_name" content="{{ site.title }}" />
|
||
|
<script type="application/ld+json">
|
||
|
{
|
||
|
"@context" : "http://schema.org",
|
||
|
"@type" : "WebSite",
|
||
|
"name" : {{ site.title | jsonify }},
|
||
|
"url" : {{ seo_url | jsonify }}
|
||
|
}
|
||
|
</script>
|
||
|
{% endif %}
|
||
|
|
||
|
{% if page.image %}
|
||
|
<meta property="og:image" content="{{ page.image }}" />
|
||
|
{% endif %}
|
||
|
|
||
|
{% if page.date %}
|
||
|
<meta property="og:type" content="article" />
|
||
|
{% if page.next.url %}
|
||
|
<link rel="next" href="{{ seo_url }}{{ page.next.url }}" title="{{ page.next.title | escape }}" />
|
||
|
{% endif %}
|
||
|
{% if page.previous.url %}
|
||
|
<link rel="prev" href="{{ seo_url }}{{ page.previous.url }}" title="{{ page.previous.title | escape }}" />
|
||
|
{% endif %}
|
||
|
<script type="application/ld+json">
|
||
|
{
|
||
|
"@context": "http://schema.org",
|
||
|
"@type": "NewsArticle",
|
||
|
"headline": {{ page.title | jsonify }},
|
||
|
"image": {{ page.image | jsonify }},
|
||
|
"datePublished": {{ page.date | date_to_xmlschema | jsonify }},
|
||
|
"description": {{ page.description | jsonify }}
|
||
|
}
|
||
|
</script>
|
||
|
{% endif %}
|
||
|
|
||
|
{% if site.twitter %}
|
||
|
<meta name="twitter:card" content="summary" />
|
||
|
<meta name="twitter:site" content="@{{ site.twitter.username | replace:"@","" }}" />
|
||
|
<meta name="twitter:title" content="{{ seo_title }}" />
|
||
|
<meta name="twitter:description" content="{{ seo_description }}" />
|
||
|
{% if page.image %}
|
||
|
<meta name="twitter:image" content="{{ page.image | escape }}" />
|
||
|
{% endif %}
|
||
|
{% if page.author %}
|
||
|
<meta name="twitter:creator" content="@{{ page.author | replace:"@","" }}" />
|
||
|
{% endif %}
|
||
|
{% endif %}
|
||
|
|
||
|
{% if site.logo %}
|
||
|
<script type="application/ld+json">
|
||
|
{
|
||
|
"@context": "http://schema.org",
|
||
|
"@type": "Organization",
|
||
|
"url": {{ seo_url | jsonify }},
|
||
|
"logo": {{ site.logo | prepend: "/" | prepend: seo_url | jsonify }}
|
||
|
}
|
||
|
</script>
|
||
|
{% endif %}
|
||
|
|
||
|
{% if site.social %}
|
||
|
<script type="application/ld+json">
|
||
|
{
|
||
|
"@context" : "http://schema.org",
|
||
|
"@type" : "{% if site.social.type %}{{ site.social.type }}{% else %}person{% endif %}",
|
||
|
"name" : "{% if site.social.name %}{{ site.social.name }}{% else %}{{ site.title }}{% endif %}",
|
||
|
"url" : {{ seo_url | jsonify }},
|
||
|
"sameAs" : {{ site.social.links | jsonify }}
|
||
|
}
|
||
|
</script>
|
||
|
{% endif %}
|
||
|
|
||
|
<!-- End Jekyll SEO tag -->
|