-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader-meta.html
64 lines (62 loc) · 4.28 KB
/
header-meta.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<meta charset="utf-8" />
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0' />
<title>{% if page.title %}{{ page.title }} – {% endif %}{{ site.name }}</title>
{% if page.title %}
<meta property="og:title" content="{{ page.title }}" />
<meta property="twitter:title" content="{{ page.title }}" />
{% else %}
<meta property="og:title" content="{{ site.name }}" />
<meta property="twitter:title" content="{{ site.name }}" />
{% endif %}
{% if page.excerpt %}
<meta name="description" content="{{ page.excerpt| strip_html | strip }}" />
<meta property="og:description" content="{{ page.excerpt| strip_html | strip }}" />
<meta name="twitter:description" content="{{ page.excerpt| strip_html | strip }}" />
{% else %}
<meta name="description" content="{{ site.description | strip }}">
<meta property="og:description" content="{{ site.description | strip }}" />
<meta name="twitter:description" content="{{ site.description | strip }}" />
{% endif %}
<meta property="og:site_name" content="{{ site.name }}" />
<meta property="twitter:site" content="{{ site.name }}" />
{% if site.social.twitter-username | default: site.social.twitter %}
<meta name="twitter:creator" content="@{{ site.social.twitter-username | default: site.social.twitter }}" /><!-- Tell twitter that this was made by {{ site.author.name }} -->
{% endif %}
<meta property="og:type" content="{{ page.type | default: site.type | default: 'website' }}" />
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
{%- if site.author -%}
<meta name="author" content="{{ site.author.name }}" />
<meta property="profile:first_name" content="{{ site.author.first-name }}" />
<meta property="profile:last_name" content="{{ site.author.last-name }}" />
{%- endif %}
{%- if site.social.default-username -%}
<meta property="profile:username" content="{{ site.social.default-username }}" />
{%- endif %}
<meta name="twitter:card" content="summary_large_image" /><!-- Tell twitter that this link can be presented as a large image with a summary -->
<meta name="msapplication-TileImage" content="/images/MS-Tile-Image.png" /><!-- When pinned as a tile for Windows' Start, this is the image -->
<meta property="og:image" content="{{ page.social-preview-image-url | default: page.hero-image | default: site.social-preview-image-url | default: '/images/Social-Preview.png' }}" /><!-- Image for sharing on social networks -->
<meta property="twitter:image" content="{{ page.social-preview-image-url | default: page.hero-image | default: site.social-preview-image-url | default: '/images/Social-Preview.png' }}" />
<meta name="twitter:image:src" content="{{ page.social-preview-image-url | default: page.hero-image | default: site.social-preview-image-url | default: '/images/Social-Preview.png' }}" />
{%- assign theme-color = site.brand.primary-color | default: site.theme-color %}
{%- if theme-color %}
<meta name="msapplication-TileColor" content="{{ theme-color }}" /><!-- When pinned as a tile for Windows' Start, this is the tile's BG color -->
<meta name="theme-color" content="{{ theme-color }}"/><!-- Color in Chrome address bar -->
<meta name="apple-mobile-web-app-status-bar-style" content="{{ theme-color }}" /><!-- Color in Safari status bar -->
{% endif %}
{% if page.date %}
<meta property="article:published_time" content="{{ page.date }}" />
{%- endif %}
{%- if page.date-modified %}
<meta property="article:modified_time" content="{{ page.date-modified }}" />
{% endif %}
{%- if site.social.twitter %}
<link rel="me" href="https://twitter.com/{{ site.social.twitter }}" />
{%- endif %}
{%- if site.social.microblog %}
<link rel="me" href="https://micro.blog/{{ site.social.microblog }}" />
{%- endif %}
{%- if site.social.mastodon %}
<link rel="me" href="https://{{ site.social.mastodon.instance }}/@{{ site.social.mastodon.username }}" />
{%- endif %}