You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
3.7 KiB

<head hexo-theme='Volantis' version='<%- theme.info.version %>' docs='https://xaoxuu.com/wiki/volantis/'>
7 years ago
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<%
var title = page.title;
if (is_archive()) {
title = 'Archives';
if (is_month())
title += ': ' + page.year + '/' + page.month;
else if (is_year())
title += ': ' + page.year;
}
else if (is_category())
title = 'Category: ' + page.category;
else if (is_tag())
title = 'Tag: ' + page.tag;
%>
<title><% if (title) { %><%= title %> | <% } %><%= config.title %></title>
6 years ago
<% if (page.keywords && config.keywords){ %>
6 years ago
<meta name="keywords" content="<%- page.keywords %>, <%- config.keywords %>">
6 years ago
<% } else if (page.keywords) { %>
6 years ago
<meta name="keywords" content="<%- page.keywords %>">
6 years ago
<% } else if (config.keywords) { %>
6 years ago
<meta name="keywords" content="<%- config.keywords %>">
6 years ago
<% } %>
6 years ago
<% if (page.description && config.description){ %>
<meta name="description" content="<%- page.description %>, <%- config.description %>">
<% } else if (page.description) { %>
<meta name="description" content="<%- page.description %>">
<% } else if (config.description) { %>
<meta name="description" content="<%- config.description %>">
<% } %>
5 years ago
<% if (config.feed && config.feed.path){ %>
6 years ago
<%- feed_tag(config.feed.path, {title: config.title}) %>
5 years ago
<% } %>
6 years ago
7 years ago
<meta name="HandheldFriendly" content="True" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6 years ago
<!-- meta -->
<% if (config.import && config.import.meta){ %>
<% (config.import.meta||[]).forEach(function(item){ %>
5 years ago
<%- item %><% }) %>
6 years ago
<% } %>
5 years ago
6 years ago
<!-- link -->
5 years ago
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
5 years ago
<% if (theme.nodewaves == true) { %>
6 years ago
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.css">
<% } %>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css">
6 years ago
<% if (config.import && config.import.link){ %>
<% (config.import.link||[]).forEach(function(item){ %>
5 years ago
<%- item %><% }) %>
6 years ago
<% } %>
6 years ago
5 years ago
<% if (config.favicon) { %>
<link rel="shortcut icon" type='image/x-icon' href="<%- url_for(config.favicon) %>">
<% } %>
5 years ago
<% if (theme.aplayer.enable) { %>
4 years ago
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.10/dist/APlayer.min.css">
<% } %>
5 years ago
<% if (config.use_cdn && theme.info && theme.info.cdn && theme.info.cdn.css && theme.info.cdn.css.style) { %>
5 years ago
<%- css(theme.info.cdn.css.style) %>
<% } else { %>
5 years ago
<%- css('style.css') %>
<% } %>
7 years ago
<script>
function setLoadingBarProgress(num) {
document.getElementById('loading-bar').style.width=num+"%";
}
</script>
6 years ago
6 years ago
<% if (config.google_analytics_key) { %>
5 years ago
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=<%- config.google_analytics_key %>"></script>
6 years ago
<script>
5 years ago
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<%- config.google_analytics_key %>');
6 years ago
</script>
<% } %>
6 years ago
<% if (config.baidu_analytics_key) { %>
6 years ago
<!-- ba -->
6 years ago
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?<%= config.baidu_analytics_key %>";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<% } %>
7 years ago
</head>