/
head.ejs
executable file
·214 lines (180 loc) · 9.48 KB
/
head.ejs
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<head>
<!-- Google Analytics -->
<% if (config.ga_track_id) { %>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=<%= config.ga_track_id %>"></script>
<script type="text/javascript">
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', '<%= config.ga_track_id %>');
</script>
<% } %>
<!-- Baidu Tongji -->
<% if (config.ba_track_id) { %>
<script type="text/javascript">
// Originial
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?<%= config.ba_track_id %>";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<% } %>
<!-- Baidu Push -->
<% if (config.baidu_push) { %>
<script>
(function () {
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
} else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
</script>
<% } %>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="google-site-verification" content="lxDfCplOZbIzjhG34NuQBgu2gdyRlAtMB4utP5AgEBc"/>
<meta name="baidu-site-verification" content="PpzM9WxOJU"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="description" content="<%= config.description %>"/>
<meta name="keyword" content="<%= config.keyword %>"/>
<link rel="shortcut icon" href="<%= config.root %><%= config.favicon %>"/>
<!-- Place this tag in your head or just before your close body tag. -->
<script async="async" defer="defer" src="https://buttons.github.io/buttons.js"></script>
<% if(config['jsdelivr']) { %>
<!-- Bootstrap Core CSS -->
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/bootstrap.min.css"/>
<!-- Custom CSS -->
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/beantech.min.css"/>
<!-- Pygments Highlight CSS -->
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/highlight.css"/>
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/widget.css"/>
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/rocket.css"/>
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/signature.css"/>
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/catalog.css"/>
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/livemylife.css"/>
<% if (config.wave) { %>
<!-- wave start -->
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/wave.css"/>
<!-- wave end -->
<% } %>
<% if (config.top) { %>
<!-- top start (article top hot config) -->
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/top.css"/>
<!-- top end -->
<% } %>
<% if (config.scroll) { %>
<!-- ThemeColor start -->
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/scroll.css"/>
<!-- ThemeColor end -->
<% } %>
<% if (config.viewer) { %>
<!-- viewer start (Picture preview) -->
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/viewer.min.css"/>
<!-- viewer end -->
<% } %>
<% if (config.search) { %>
<!-- Search start -->
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/search.css"/>
<!-- Search end -->
<% } %>
<% if (config.themecolor && config['themecolor']['enable']) { %>
<!-- ThemeColor start -->
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/themecolor.css"/>
<!-- ThemeColor end -->
<% } %>
<% if(config['gitment']){ %>
<!-- gitment start -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/default.css"/>
<!-- gitment end -->
<% } %>
<% if(config['gitalk']){ %>
<!-- gitalk start -->
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css"> -->
<link rel="stylesheet" href="<%- config.jsdelivr.jsdelivr_url %><%- config.jsdelivr.github_username %>/<%- config.jsdelivr.github_username %>.github.io/css/gitalk.css"/>
<!-- gitalk end -->
<% } %>
<% } else { %>
<!-- Bootstrap Core CSS -->
<link rel="stylesheet" href="<%= config.root %>css/bootstrap.min.css"/>
<!-- Custom CSS -->
<link rel="stylesheet" href="<%= config.root %>css/beantech.min.css"/>
<!-- Pygments Highlight CSS -->
<link rel="stylesheet" href="<%= config.root %>css/highlight.css"/>
<link rel="stylesheet" href="<%= config.root %>css/widget.css"/>
<link rel="stylesheet" href="<%= config.root %>css/rocket.css"/>
<link rel="stylesheet" href="<%= config.root %>css/signature.css"/>
<link rel="stylesheet" href="<%= config.root %>css/catalog.css"/>
<link rel="stylesheet" href="<%= config.root %>css/livemylife.css"/>
<% if (config.wave) { %>
<!-- wave start -->
<link rel="stylesheet" href="<%= config.root %>css/wave.css"/>
<!-- wave end -->
<% } %>
<% if (config.top) { %>
<!-- top start (article top hot config) -->
<link rel="stylesheet" href="<%= config.root %>css/top.css"/>
<!-- top end -->
<% } %>
<% if (config.scroll) { %>
<!-- ThemeColor start -->
<link rel="stylesheet" href="<%= config.root %>css/scroll.css"/>
<!-- ThemeColor end -->
<% } %>
<% if (config.viewer) { %>
<!-- viewer start (Picture preview) -->
<link rel="stylesheet" href="<%= config.root %>css/viewer.min.css"/>
<!-- viewer end -->
<% } %>
<% if (config.search) { %>
<!-- Search start -->
<link rel="stylesheet" href="<%= config.root %>css/search.css"/>
<!-- Search end -->
<% } %>
<% if (config.themecolor && config['themecolor']['enable']) { %>
<!-- ThemeColor start -->
<link rel="stylesheet" href="<%= config.root %>css/themecolor.css"/>
<!-- ThemeColor end -->
<% } %>
<% if(config['gitment']){ %>
<!-- gitment start -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/default.css"/>
<!-- gitment end -->
<% } %>
<% if(config['gitalk']){ %>
<!-- gitalk start -->
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css"> -->
<link rel="stylesheet" href="<%= config.root %>css/gitalk.css"/>
<!-- gitalk end -->
<% } %>
<% } %>
<!-- Custom Fonts -->
<!-- <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> -->
<!-- Hux change font-awesome CDN to qiniu -->
<link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.5.0/css/font-awesome.min.css" type="text/css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- Hux Delete, sad but pending in China <link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'> <link
href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/ css'> -->
<!-- HTML5 Shim and Respond.js 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="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]-->
<!-- ga & ba script hoook -->
<link rel="canonical" href="<%= config.url + config.root + (page.path||'').replace('index.html', '') %>">
<title>
<% if (page.title) { %>
<%= page.title + ' - ' + config.SEOTitle %>
<% } else{%>
<%= config.SEOTitle %>
<% } %>
</title>
</head>