beautifulSA-jekyll/_includes/head.html
Marco Blessing 6a84cef6a2
Fetch upstream (#5)
* fix(#744): Escape special characters in title (#745)

* add matt artist as sponsor

* Fix margin top alignment issue on Safari (#750)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Remove references to any public Staticman API instance (#775)

* Update CHANGELOG.md

* Adding option for Medium Social Link at footer  (#784)

* Itch.io social link (#788)

* Update CHANGELOG.md

* Add support for Cloudflare analytics (#798)

* Include Reddit in share options of posts (#815)

* add search to the navbar using 'post_search' config param

* Update CHANGELOG.md

* ui: make sure search results dont have underline until hovered

* search feature: make sure page scrollbar disappears when searching but a scrollbar for search items shows if needed

* update changelog

Co-authored-by: Dmitry <dmitry.b.danilov@gmail.com>
Co-authored-by: Dean Attali <dean@attalitech.com>
Co-authored-by: Amy Troschinetz <lexicalunit@lexicalunit.com>
Co-authored-by: Dean Attali <daattali@gmail.com>
Co-authored-by: Vincent Tam <VincentTam@users.noreply.github.com>
Co-authored-by: Diksha Verma <112dikshaverma@gmail.com>
Co-authored-by: Emaleth <Emaleth@protonmail.com>
Co-authored-by: Ari Kalfus <dev@artis3nal.com>
Co-authored-by: Leedan <l33d4n@gmail.com>
Co-authored-by: Marco Blessing <marco.blessing@komm.one>
2021-08-02 17:02:35 +02:00

151 lines
4.5 KiB
HTML

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% capture title %}
{%- if page.share-title -%}
{{ page.share-title | strip_html | xml_escape }}
{%- elsif page.title -%}
{{ page.title | strip_html | xml_escape }}
{%- else -%}
{{ site.title | strip_html | xml_escape }}
{%- endif -%}
{% endcapture %}
{% capture description %}
{%- if page.share-description -%}
{{ page.share-description | strip_html | xml_escape }}
{%- elsif page.subtitle -%}
{{ page.subtitle | strip_html | xml_escape }}
{%- else -%}
{%- assign excerpt_length = site.excerpt_length | default: 50 -%}
{{ page.content | strip_html | xml_escape | truncatewords: excerpt_length | strip }}
{%- endif -%}
{% endcapture %}
<title>{{ title }}</title>
{% if site.author %}
<meta name="author" content="{{ site.author }}">
{% endif %}
<meta name="description" content="{{ description }}">
{% if site.mobile-theme-col %}
<meta name="theme-color" content="{{ site.mobile-theme-col }}">
{% endif %}
{% if site.keywords %}
<meta name="keywords" content="{{ site.keywords }}">
{% endif %}
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ '/feed.xml' | absolute_url }}">
{% include gtag.html %}
{% include gtm_head.html %}
{% include google_analytics.html %}
{% include cloudflare_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 %}
{% 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 %}
{% if site.title %}
<meta property="og:site_name" content="{{ site.title }}">
{% endif %}
{%- capture 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 img=img | strip -%}
<meta property="og:title" content="{{ title }}">
<meta property="og:description" content="{{ description }}">
{% if img != "" %}
<meta property="og:image" content="{{ 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 }}">
<meta property="og:url" content="{{ page.url | absolute_url }}">
<link rel="canonical" href="{{ page.url | absolute_url }}">
{% else %}
<meta property="og:type" content="website">
<meta property="og:url" content="{{ page.url | absolute_url | strip_index }}">
<link rel="canonical" href="{{ page.url | absolute_url | strip_index }}">
{% endif %}
{% if img != "" and 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 }}">
<meta property="twitter:title" content="{{ title }}">
<meta property="twitter:description" content="{{ description }}">
{% if img != "" %}
<meta name="twitter:image" content="{{ img | absolute_url }}">
{% endif %}
{% include matomo.html %}
{% if page.comments and site.staticman.repository and site.staticman.branch %}
<link rel="stylesheet" href="{{ "/assets/css/staticman.css" | relative_url }}">
{% endif %}
{% if page.head-extra %}
{% for file in page.head-extra %}
{% include {{ file }} %}
{% endfor %}
{% endif %}
</head>