-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathhead.html
More file actions
128 lines (111 loc) · 5.06 KB
/
head.html
File metadata and controls
128 lines (111 loc) · 5.06 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{{
# This script builds the head of a site, including opening <html> tag, a complete <head> and an open <body> tag.
# Following parameters are allowed:
# title The text to print in between <title></title>.
# extraCSS Additional CSS files from /css/ can be added to the <head>. style.css and print.css are always included.
# extraJS Additional JS files from /js/ can be added to <head>.
# bodyID HTML id attribute for the <body> tag.
# page Optional <div id="page"> tag to allow easy use of CSS flex boxes or other styles.
Must be closed via the footer include. Default: False
#
# Unfortunately, there were problems with identifying whether a variable has been set no the page or not.
# We therefore need these hacks to print the correct values.
}}
{%- assign notPage = True -%}
{%- assign metatit = "NewPipe - a free YouTube client" -%}
{%- if page.metatitle -%}
{%- unless page.metatitle == "" -%}
{%- unless page.metatitle == nil -%}
{%- assign metatit = page.metatitle -%}
{%- assign notPage = False -%}
{%- endunless -%}
{%- endunless -%}
{%- else if page.title -%}
{%- unless page.title == "" -%}
{%- unless page.title == nil -%}
{%- assign metatit = page.title -%}
{%- assign notPage = False -%}
{%- endunless -%}
{%- endunless -%}
{%- else if layout.metatitle AND notPage == True -%}
{%- unless layout.metatitle == "" -%}
{%- unless layout.metatitle == nil -%}
{%- assign metatit = layout.metatitle -%}
{%- endunless -%}
{%- endunless -%}
{%- endif -%}
{%- if include.title -%}
{%- assign renderedTitle = include.title -%}
{%- else -%}
{%- assign renderedTitle = page.title | default: metatit -%}
{%- endif -%}
{%- assign des = site.description -%}
{%- assign notPage = True -%}
{%- if page.metades -%}
{%- unless page.metades == "" -%}
{%- unless page.metades == nil -%}
{%- assign des = page.metades | normalize_whitespace -%}
{%- assign notPage = False -%}
{%- endunless -%}
{%- endunless -%}
{%- else if page.post AND page.excerpt %}
{%- assign des = page.excerpt | strip_html | normalize_whitespace -%}
{%- else if layout.metades AND notPage == True -%}
{%- unless layout.metades == "" -%}
{%- unless page.metades == nil -%}
{%- assign des = layout.metades -%}
{%- endunless -%}
{%- endunless -%}
{%- endif -%}
{%- if page.author -%}
{%- assign metaAuthor = page.author -%}
{%- else -%}
{%- assign metaAuthor = "Team NewPipe" -%}
{%- endif -%}
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ renderedTitle }}</title>
<meta name="author" content="{{ metaAuthor | strip_html }}">
<meta name="description" content="{{ des | strip_html }}">
<meta name="keywords" content="NewPipe, YouTube, Android, player, background, privacy, PeerTube, Bandcamp, Soundcloud">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<meta property="og:site_name" content="NewPipe">
<meta property="og:title" content="{{ metatit | strip_html }}">
<meta property="og:type" content="website">
<meta property="og:url" content="{{ site.url }}">
<meta property="og:image" content="{{ site.url }}{{ site.baseurl }}/img/logo_400.png">
<meta property="og:image:width" content="400">
<meta property="og:image:height" content="400">
<meta property="og:image:type" content="image/png">
<link rel="icon" href="{{ site.baseurl }}/favicon.ico" type="icon" sizes="64x64">
<link rel="alternate" type="application/rss+xml" title="RSS" href="/blog/feeds/news.rss">
<link rel="alternate" type="application/atom+xml" title="ATOM" href="/blog/feeds/news.atom">
<!-- JQuery -->
<script src="{{ site.baseurl }}/js/jquery.min.js"></script>
<!-- Bootstrap -->
<link href="{{ site.baseurl }}/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="/js/html5shiv.min.js"></script>
<script src="/js/respond.min.js"></script>
<![endif]-->
<!-- custom scripts -->
{% for script in include.extraJS -%}
<script src="{{ site.baseurl }}/js/{{ script }}"></script>
{% endfor %}
<!-- FontAwesome -->
<link rel="stylesheet" href="{{ site.baseurl }}/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/css/style.css">
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/css/print.css">
<!-- custom stylesheets -->
{% for stylesheet in include.extraCSS -%}
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/css/{{ stylesheet }}">
{% endfor %}
<!-- temporary KeepAndroidOpen banner -->
</head>
<body{% if include.bodyID %} id="{{ include.bodyID }}"{% endif %}>
<script src="https://keepandroidopen.org/banner.js"></script>
{% if include.page == "False" %}{% else %}<div id="page">{% endif %}