-
Notifications
You must be signed in to change notification settings - Fork 637
/
Copy pathmetadata.html
34 lines (31 loc) · 1.65 KB
/
metadata.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
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="{{ "/assets/images/favicon.ico" | relative_url }}" type="image/x-icon" />
<meta name="msapplication-TileColor" content="#1a1919">
<meta name="msapplication-TileImage" content="https://cdn-shop.adafruit.com/static/mstile-144x144.png" />
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt |
strip_html | strip_newlines | truncate: 160 }}{% else
%}{{ site.description }}{% endif %}" />
<!-- Twitter and Open Graph cards -->
<meta name="twitter:site" content="@{{ site.twitter_username }}" />
<meta property="og:url" content="{{ page.url | absolute_url }}" />
{% if page.title %}
<meta property="og:title" content="{{ site.title | append: ' - ' | append: page.title }}" />
{% else %}
<meta property="og:title" content="{{ site.title }}" />
{% endif %}
{% if page.excerpt %}
<meta property="og:description" content="{{ page.excerpt | strip_html | strip_newlines | truncate: 300 }}" />
{% else %}
<meta property="og:description" content="{{ site.description }}" />
{% endif %}
{% if page.board_image %}
<meta name="twitter:card" content="summary_large_image" />
<meta property="og:image" content="{{ "/assets/images/boards/large/" | append: page.board_image | absolute_url }}" />
{% else %}
<meta name="twitter:card" content="summary" />
<meta property="og:image" content="{{ site.site_image }}" />
{% endif %}
<meta property="og:type" content="website" />