beautifulSA-jekyll/_includes/head.html

163 lines
4.8 KiB
HTML
Raw Normal View History

2015-03-02 21:06:05 +01:00
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
2015-03-02 21:06:05 +01:00
<title>{% if page.use-site-title %}{{ site.title }} {{ site.title-separator | default: '-' }} {{ site.description }}{% elsif page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
2020-04-24 02:30:01 +02:00
{% if site.author %}
<meta name="author" content="{{ site.author }}">
{% endif %}
2020-08-22 10:39:54 +02:00
{%- capture description -%}
{%- if page.description -%}
{{ page.description }}
{%- elsif page.subtitle -%}
{{ page.subtitle }}
{%- else -%}
{{ site.description }}
{%- endif -%}
{%- endcapture -%}
<meta name="description" content="{{ description }}">
2015-03-02 21:06:05 +01:00
2020-08-08 08:09:00 +02:00
{% if site.mobile-theme-col %}
<meta name="theme-color" content="{{ site.mobile-theme-col }}">
{% endif %}
2020-08-08 05:06:10 +02:00
{% if site.keywords %}
<meta name="keywords" content="{{ site.keywords }}">
{% endif %}
<link rel="alternate" type="application/rss+xml" title="{{ site.title | default: 'Untitled' }} {{ site.title-separator | default: '-' }} {{ site.description }}" href="{{ '/feed.xml' | absolute_url }}">
2016-06-04 10:55:17 +02:00
{% include gtag.html %}
{% include gtm_head.html %}
{% include google_analytics.html %}
{% if layout.common-ext-css %}
{% for css in layout.common-ext-css %}
{% include ext-css.html css=css %}
{% endfor %}
{% endif %}
{% if layout.common-css %}
{% for css in layout.common-css %}
<link rel="stylesheet" href="{{ css | relative_url }}">
{% endfor %}
{% endif %}
{% if site.site-css %}
{% for css in site.site-css %}
<link rel="stylesheet" href="{{ css | relative_url }}">
{% endfor %}
{% endif %}
2020-08-22 10:39:54 +02:00
{% if page.ext-css %}
{% for css in page.ext-css %}
{% include ext-css.html css=css %}
{% endfor %}
{% endif %}
{% if page.css %}
{% for css in page.css %}
<link rel="stylesheet" href="{{ css | relative_url }}">
{% endfor %}
{% endif %}
{% if site.fb_app_id %}
<meta property="fb:app_id" content="{{ site.fb_app_id }}">
{% endif %}
2020-08-08 08:18:14 +02:00
{% if site.title %}
<meta property="og:site_name" content="{{ site.title }}">
{% endif %}
2020-08-22 10:39:54 +02:00
{%- capture share-title -%}
{%- if page.meta-title -%}
{{ page.meta-title }}
{%- elsif page.title -%}
{{ page.title }}
{%- else -%}
{{ site.title }}
{%- endif -%}
{%- endcapture -%}
{%- capture share-description -%}
{%- if page.meta-description -%}
{{ page.meta-description }}
{%- elsif page.subtitle -%}
{{ page.subtitle }}
{%- else -%}
{{ {{ page.content | strip_html | xml_escape | truncatewords: 50 }} }}
{%- endif -%}
{%- endcapture -%}
{%- capture share-img -%}
{%- if page.share-img -%}
{{ page.share-img }}
{%- elsif page.cover-img -%}
{%- if page.cover-img.first -%}
{{ page.cover-img[0].first.first }}
{%- else -%}
{{ page.cover-img }}
{%- endif -%}
{%- elsif page.thumbnail-img -%}
{{ page.thumbnail-img }}
{%- elsif site.avatar -%}
{{ site.avatar }}
{% endif %}
{%- endcapture -%}
{%- assign share-img=share-img | strip -%}
2020-08-22 10:39:54 +02:00
<meta property="og:title" content="{{ share-title }}">
<meta property="og:description" content="{{ share-description }}">
2020-08-22 10:39:54 +02:00
{% if share-img != "" %}
<meta property="og:image" content="{{ share-img | absolute_url }}">
{% endif %}
{% if page.id %}
<meta property="og:type" content="article">
<meta property="og:article:author" content="{{ site.author }}">
<meta property="og:article:published_time" content="{{ page.date | date_to_xmlschema }}">
{% else %}
<meta property="og:type" content="website">
{% endif %}
2015-03-31 09:30:08 +02:00
{% if page.id %}
<meta property="og:url" content="{{ page.url | absolute_url }}">
<link rel="canonical" href="{{ page.url | absolute_url }}">
2015-03-31 09:30:08 +02:00
{% else %}
<meta property="og:url" content="{{ page.url | absolute_url | strip_index }}">
<link rel="canonical" href="{{ page.url | absolute_url | strip_index }}">
2015-03-31 09:30:08 +02:00
{% endif %}
2020-08-22 10:39:54 +02:00
{% if share-img != "" and share-img != site.avatar %}
<meta name="twitter:card" content="summary_large_image">
{% else %}
<meta name="twitter:card" content="summary">
{% endif %}
<meta name="twitter:site" content="@{{ site.social-network-links.twitter }}">
<meta name="twitter:creator" content="@{{ site.social-network-links.twitter }}">
2020-08-22 10:39:54 +02:00
<meta property="twitter:title" content="{{ share-title }}">
<meta property="twitter:description" content="{{ share-description }}">
2020-08-22 10:39:54 +02:00
{% if share-img != "" %}
<meta name="twitter:image" content="{{ share-img | absolute_url }}">
{% endif %}
{% if site.matomo %}
{% include matomo.html %}
{% endif %}
{% if page.comments and site.staticman.repository and site.staticman.branch %}
<link rel="stylesheet" href="{{ "/assets/css/staticman.css" | relative_url }}">
{% endif %}
2020-08-09 03:44:57 +02:00
{% if page.head-extra %}
{% include {{ page.head-extra }} %}
{% endif %}
</head>