p0c-website

Proof of concepts for fun and profit
git clone https://git.in0rdr.ch/p0c-website.git
Log | Files | Refs | Pull requests |Archive | README | LICENSE

head.html (4184B)


      1 <head>
      2   <meta charset="utf-8">
      3   <meta name="apple-mobile-web-app-capable" content="yes">
      4   <meta http-equiv="X-UA-Compatible" content="IE=edge">
      5   <meta name="viewport" content="width=device-width, initial-scale=1">
      6 
      7   {% assign page_title = '' %}
      8   {% if page.title == "Home" %}
      9       {% capture page_title %}
     10         {{ site.title_left }}{{ site.title_right }} | {{ site.description }}
     11         {%if paginator and paginator.page != 1 %} - {{ paginator.page }}{% endif %}
     12       {% endcapture %}
     13   {% else %}
     14       {% capture page_title %}
     15           {%if page.slug == 'category' %}Category: {% endif %}
     16           {%if page.slug == 'tag' %}Tag: {% endif %} {{ page.title }} | {{ site.title_left }}{{ site.title_right }}
     17       {% endcapture %}
     18   {% endif %}
     19   {% capture page_title %}
     20       {{ page_title | strip | rstrip | lstrip | escape | strip_newlines }}
     21   {% endcapture %}
     22 
     23   <title>{{ page_title }}</title>
     24 
     25   {% assign page_description = '' %}
     26   {% capture page_description %}
     27       {% if page.description %}
     28           {{ page.description | strip_html | strip | rstrip | strip_newlines | truncate: 160 }}
     29       {% else %}
     30           {{ site.description }}
     31       {% endif %}
     32       {%if paginator and paginator.page != 1 %} - {{ paginator.page }} {% endif %}
     33       {%if page.slug == 'category' %} Category: {{ page.title }}{% endif %}
     34       {%if page.slug == 'tag' %} Tag: {{ page.title }}{% endif %}
     35   {% endcapture %}
     36 
     37   {% capture page_description %}
     38       {{ page_description | strip | rstrip | lstrip | escape | strip_newlines }}
     39   {% endcapture %}
     40 
     41   <meta name="description" content="{{ page_description }}">
     42   <meta name="keywords" content="{% if page.keywords %}{{ page.keywords }}{% else %}{{ site.keywords }}{% endif %}">
     43 
     44   <meta name="HandheldFriendly" content="True">
     45   <meta name="MobileOptimized" content="320">
     46 
     47   {% assign page_image = '' %}
     48   {% capture page_image %}
     49       {% if page.cover %}
     50           {{ page.cover | relative_url }}
     51       {% else %}
     52           {{ site.cover | relative_url }}
     53       {% endif %}
     54   {% endcapture %}
     55   {% capture page_image %}{{ page_image | strip | rstrip | lstrip | escape | strip_newlines }}{% endcapture %}
     56 
     57   <!-- Social: Facebook / Open Graph -->
     58 {% if page.id %}
     59   <meta property="og:type" content="article">
     60   <meta property="article:author" content="{{ site.author.name }}">
     61   <meta property="article:section" content="{{ page.categories | join: ', ' }}">
     62   <meta property="article:tag" content="{{ page.keywords }}">
     63   <meta property="article:published_time" content="{{ page.date }}">
     64 {% else%}
     65   <meta property="og:type" content="website">
     66 {% endif %}
     67   <meta property="og:url" content="{{ page.url | replace:'index.html','' | relative_url }}">
     68   <meta property="og:title" content="{{ page_title }}">
     69   <meta property="og:image" content="{{ page_image }}">
     70   <meta property="og:description" content="{{ page_description }}">
     71   <meta property="og:site_name" content="{{ site.author.name }}">
     72   <meta property="og:locale" content="en_US">
     73 
     74   <!-- Social: Twitter -->
     75   <meta name="twitter:card" content="summary_large_image">
     76   <meta name="twitter:site" content="{{ site.twitter_username }}">
     77   <meta name="twitter:title" content="{{ page_title }}">
     78   <meta name="twitter:description" content="{{ page_description }}">
     79   <meta name="twitter:image:src" content="{{ page_image }}">
     80 
     81   <!-- Social: Google+ / Schema.org  -->
     82   <meta itemprop="name" content="{{ page_title }}">
     83   <meta itemprop="description" content="{{ page_description }}">
     84   <meta itemprop="image" content="{{ page_image }}">
     85 
     86   <!-- Canonical link tag -->
     87   <link rel="canonical" href="{{ page.url | replace:'index.html','' | relative_url }}">
     88   <link rel="alternate" type="application/rss+xml" title="{{ site.title_left }}{{ site.title_right }}" href="{{ "/feed.xml" | relative_url }}">
     89 
     90   <!-- rel prev and next -->
     91   {% if paginator.previous_page %}
     92     <link rel="prev" href="{{ paginator.previous_page_path | relative_url }}">
     93   {% endif %}
     94   {% if paginator.next_page %}
     95     <link rel="next" href="{{ paginator.next_page_path | relative_url }}">
     96   {% endif %}
     97 
     98   <link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}">
     99 </head>