layout: plugins/compress
{%- assign author = site.github.owner_name -%} {%- assign lang = site.lang | default: “en” -%} {%- case page.url -%}
{%- when "/" -%} {%- assign title = site.title | append: " · " | append: site.description | truncate: 110 -%} {%- else -%} {%- assign title = page.title | default: page.url | append: " · " | append: site.title | truncate: 110 -%}
{%- endcase -%} {%- assign description = content | strip_html | split: “ ” | join: “ ” | escape | truncate: 150 -%}
{%- assign schema_date = page.date | default: site.time | date_to_xmlschema -%} {%- assign schema_modi = site.time | date_to_xmlschema -%} {%- assign schema_curl = page.url | absolute_url | xml_escape -%}
{%- capture site_scss -%}
@import "jekyll-theme-amp.scss"; {% include assets/custom.scss %} {{ site.scss }}
{%- endcapture -%}
<!doctype html> <html amp lang=“{{ lang }}”>
<head>
<meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta content="IE=Edge" http-equiv="X-UA-Compatible"> <title>{{ title }}</title> <!-- meta --> <meta name="description" content="{{ description }}"> <meta name="author" content="{{ author }}"> <meta name="revised" content="{{ site.github.build_revision | slice: 0, 7 }}"> <meta name="generator" content="Jekyll v{{ jekyll.version }}"> <!-- meta-ogp --> <meta property="og:title" content="{{ title }}"> <meta property="og:description" content="{{ description }}"> <meta property="og:locale" content="{{ lang }}"> <meta property="og:url" content="{{ schema_curl }}"> <meta property="og:type" content="article"> <meta property="article:author" content="{{ author }}"> <meta property="article:published_time" content="{{ schema_date }}"> <meta property="article:modified_time" content="{{ schema_modi }}"> <!-- meta-custom --> {% for meta in site.meta -%} <meta name="{{ meta.first }}" content="{{ meta.last }}"> {% endfor -%} <!-- link --> <link rel="canonical" href="{{ schema_curl }}"> <link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/assets/favicon.svg"> <!-- style --> <style amp-boilerplate>{{ "@import 'amp.scss'" | scssify | strip_newlines }}</style> <noscript> <style amp-boilerplate>{{ "@import 'amp.noscript.scss'" | scssify | strip_newlines }}</style> </noscript> <style amp-custom>{{ site_scss | scssify | strip_newlines | replace: " !important", "" }}</style> <!-- script --> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "mainEntityOfPage": { "@type": "WebPage", "@id": "{{ schema_curl }}" }, "headline": "{{ page.title | truncate: 110 }}", "image": [ {%- for image in page.image -%} "{{ image.last }}"{% unless forloop.last %},{% endunless %} {%- endfor -%} ], "author": { "@type": "Person", "name": "{{ author }}" }, "datePublished": "{{ schema_date }}", "dateModified": "{{ schema_modi }}", "publisher": { "@type": "Organization", "name": "{{ site.title }}", "logo": { "@type": "ImageObject", "url": "{{ site.logo | default: 'assets/schema.600x60.png' | absolute_url | xml_escape }}" } }, "description": "{{ description }}" } </script> <script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<main class="container"> <article class="markdown-body">{{ content }}</article> </main> <script>{% include assets/custom.js %} {{ site.script }}</script>
</body>
</html>