{% include helper/seo.html %}

Bausteine

{% include helper/seo.html %}

Pure Jekyll Liquid for SEO

{% comment %}
*
*   Liquid variables are created at the top to keep the source DRY and clean.
*   Idea by ericcarlisle.com
*
*   Variables › {{ url }} › site.url + site.baseurl
*   Variables › {{ description }} › excerpt, page.meta_description, or site.description
*   Variables › {{ title }} › page.title
*
{% endcomment %}{% capture ignore %}

{% capture title %}{% if page.meta_title %}{{ page.meta_title }}{% elsif page.title %}{{ page.title }}{% else %}{{ site.title | strip_html | strip }}{{ site.slogan | strip_html | strip | prepend: " – " }}{% endif %}{% endcapture %}
{% assign title = title | strip_html | escape | strip_newlines %}

{% capture description %}{% if page.meta_description %}{{ page.meta_description }}{% elsif page.teaser %}{{ page.teaser }}{% elsif page.excerpt %}{{ page.excerpt }}{% elsif site.description %}{{ site.description }}{% endif %}{% endcapture %}
{% assign description = description | strip_html | escape | strip %}

{% assign url = site.url | append: site.baseurl %}

{% endcapture %}

  <title>{{ title }}</title>
  <meta name="description" content="{{ description }}">
  <link rel="canonical" href="{{ url }}{{ page.url }}">


  <!-- Google Search Console/Webmaster Tools Verification -->
  {% if site.google_site_verification %}  <meta name="google-site-verification" content="{{ site.google_site_verification}}">{% endif %}
  {% if site.bing_webmastertools_id %}  <meta name="msvalidate.01" content="{{ site.bing_webmastertools_id }}" >{% endif %}
  {% if site.alexa_verify_id %}  <meta name="alexaVerifyID" content="{{ site.alexa_verify_id }}">{% endif %}
  {% if page.noindex == true or layout.noindex == true %}  <meta name="robots" content="noindex">{% endif %}


  <!-- Facebook Open Graph -->
  <meta property="og:title" content="{{ title }}">
  <meta property="og:description" content="{{ description | truncate: 300 }}">
  <meta property="og:url" content="{{ url }}{{ page.url }}">
  <meta property="og:locale" content="{{ site.lang | default: "en_EN" }}">
  <meta property="og:type" content="website">
  <meta property="og:site_name" content="{{ site.title }}">
  <meta property="og:image" content="{{ url }}{% if page.image.facebook %}{{ page.image.facebook }}{% elsif page.image.title %}{{ page.image.title }}{% else %}/assets/img/facebook-placeholder-1200x630.jpg{% endif %}">
  {% if site.socialmedia.facebook %}<meta property="article:author" content="https://www.facebook.com/{{ site.socialmedia.facebook }}">{% endif %}


  <!-- More › https://dev.twitter.com/cards/overview -->
  <meta name="twitter:card" content="summary">
{% if site.socialmedia.twitter %}
  <meta name="twitter:site" content="{{ site.socialmedia.twitter }}">
  <meta name="twitter:creator" content="{{ site.socialmedia.twitter }}">
{% endif %}
  <meta name="twitter:title" content="{{ title }}">
  <meta name="twitter:description" content="{{ description | truncate: 200 }}">
  <meta name="twitter:image" content="{{ url }}{% if page.image.facebook %}{{ page.image.twitter }}{% elsif page.image.title %}{{ page.image.title }}{% else %}/assets/img/facebook-placeholder-1200x630.jpg{% endif %}">

  {% comment %}
  *
  *   This generates JSONLD data for your website. Find out more about
  *   it
  *
  *   Tool for testing › https://search.google.com/structured-data/testing-tool/
  *   JSONLD Templates › http://jsonld.com/
  *
  {% endcomment %}
  {% assign url = site.url | append: site.baseurl %}

  {% if page.url == '/' %}
    <!-- JSONLD Structured Data -->
    <script type="application/ld+json">
    {
    "@context": "http://schema.org",
    "@type": "WebSite",
    "url": "{{ url }}",
    "name": "{{ site.title }}",
     "author": {
        "@type": "Organization",
        "name": "{{ site.author }}"
      },
    "description": "{{ description }}",
    "publisher": "{{ site.author }}",
    "potentialAction": {
      "@type": "SearchAction",
      "target": "{{ site.url }}{{ site.baseurl }}/suche/?query={search_term}",
      "query-input": "required name=search_term" }
      }
    </script>
  {% endif %}

  {% if page.id %}
    <!-- JSONLD Structured Data -->
    <script type="application/ld+json">
    { "@context": "http://schema.org",
      "@type": "BlogPosting",
      "headline": "{{ page.title }}",
      {% if page.subtitle %}"alternativeHeadline": "{{ page.subtitle }}",{% endif %}
      "image": "{{ url }}{% if page.image.title %}{{ page.image.title }}{% else %}{{ site.logo  }}{% endif %}",
      "editor": "{% if page.author %}{{ page.author }}{% else %}{{ site.author }}{% endif %}",
      {% if page.categories %}"genre": "{% for category in page.categories %}{{ category }}{% if forloop.last %}{% else %}, {% endif %}{% endfor %}",{% endif %}
      {% if page.tags %}"keywords": "{% for tag in page.tags %}{{ tag }}{% if forloop.last %}{% else %}, {% endif %}{% endfor %}{% endif %}",
      "wordcount": "{{ page.content | number_of_words }}",
      "publisher": "{{ site.publisher }}",
      "url": "{{ url }}",
      "datePublished": "{{ page.date }}",
      "dateCreated": "{{ page.date }}",
      "dateModified": "{{ page.date }}",
       "author": {
        "@type": "Organization",
        "name": "{% if page.author %}{{ page.author }}{% else %}{{ site.author }}{% endif %}"
      },
     "description": "{{ description }}"
     }
    </script>
  {% endif %}