|
1 | 1 | <head> |
2 | | - <meta charset="utf-8"> |
3 | | - <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
4 | | - <meta name="viewport" content="width=device-width, initial-scale=1"> |
5 | | - <meta name="description" content="{% if page.description %}{{ page.description | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}"> |
6 | 2 | {%- capture keywords %} |
7 | 3 | {%- if page.related_pages %} |
8 | 4 | {%- for section in page.related_pages %} |
|
19 | 15 | {%- endfor %}{{allkeywords}} |
20 | 16 | {%- endif %} |
21 | 17 | {%- endcapture %} |
| 18 | + {%- if page.type %} |
| 19 | + {%- assign subtitle = page.type | replace: "_", " " %} |
| 20 | + {%- endif %} |
| 21 | + {%- capture title %}{% if page.url == "/" %}{{site.title}}{% elsif page.title %}{% if subtitle %}{{subtitle}}: {% endif %}{{ page.title }} | {{ site.title }}{%- else %}{{ site.title }}{% endif %}{% endcapture %} |
| 22 | + {%- capture description %}{% if page.url == "/" %}{{site.description}}{% elsif page.description %}{{ page.description | strip_html | replace: '\n', ' ' | truncatewords: 30, '...' }}{% elsif page.summary %}{{ page.summary | strip_html | replace: '\n', ' ' | truncatewords: 30, '...' }}{% else %}{{ page.content | strip_html | replace: '\n', ' ' | truncatewords: 30, '...' }}{% endif %}{% endcapture %} |
| 23 | + <meta charset="utf-8"> |
| 24 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 25 | + <title>{{title}}</title> |
| 26 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 27 | + <meta name="description" content="{{description}}"> |
22 | 28 | <meta name="keywords" content="{{keywords}}"> |
23 | | - <meta property="og:title" content="{{ site.title }}" /> |
24 | | - <meta property="og:description" content="{{ site.description }}" /> |
| 29 | + <meta property="og:title" content="{{title}}" /> |
| 30 | + <meta property="og:description" content="{{description}}" /> |
| 31 | + <meta property="og:type" content="article"> |
| 32 | + <meta property="og:url" content="{{ page.url | absolute_url }}"> |
25 | 33 | <meta property="og:image" content="//{{site.github.url | remove: 'https://' | remove: 'http://'}}/assets/img/apple-touch-icon.png" /> |
26 | | - <meta name="apple-mobile-web-app-title" content="{{site.title}}"> |
| 34 | + <meta name="apple-mobile-web-app-title" content="{{title}}"> |
27 | 35 | <meta name="msapplication-TileColor" content="#{{site.theme_variables.theme_color | default: 0d6efd }}"> |
28 | 36 | <meta name="theme-color" content="#{{site.theme_variables.theme_color | default: 0d6efd }}"> |
29 | 37 | {%- if page.no_robots %} |
30 | 38 | <meta name="robots" content="noindex" /> |
31 | 39 | {%- endif %} |
32 | | - {%- if page.type %} |
33 | | - {%- assign subtitle = page.type | replace: "_", " " | capitalize %} |
34 | | - {%- endif %} |
35 | | - <title>{% if page.title %}{% if subtitle %}{{subtitle}}: {% endif %}{{ page.title }} | {{ site.title }}{%- else %}{{ site.title }}{% endif %}</title> |
36 | 40 | <!-- Syntax highlighting --> |
37 | 41 | <link rel="stylesheet" href="{{ 'assets/css/syntax.css' | relative_url }}"> |
38 | 42 | <!-- Country flags --> |
|
0 commit comments