mirror of
https://github.com/interstellar750/hexo_s
synced 2024-10-19 00:23:51 +08:00
66 lines
2.0 KiB
Plaintext
66 lines
2.0 KiB
Plaintext
|
<meta charset="UTF-8">
|
||
|
<meta name="viewport"
|
||
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||
|
<% if(config.author){ %>
|
||
|
<meta name="author" content="<%- config.author %>">
|
||
|
<% } %>
|
||
|
<% if(config.subtitle){ %>
|
||
|
<meta name="subtitle" content="<%- config.subtitle %>">
|
||
|
<% } %>
|
||
|
<% if(config.description){ %>
|
||
|
<meta name="description" content="<%- config.description %>">
|
||
|
<% } %>
|
||
|
<% if(config.keywords){ %>
|
||
|
<meta name="keywords" content="<%- config.keywords %>">
|
||
|
<% } %>
|
||
|
<%
|
||
|
var title = page.title;
|
||
|
|
||
|
if (is_archive()){
|
||
|
title = __('archive_a');
|
||
|
|
||
|
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>
|
||
|
|
||
|
<%# favicon %>
|
||
|
<% if (theme.favicon){ %>
|
||
|
<link rel="icon" href="<%- url_for(theme.favicon) %>">
|
||
|
<% } %>
|
||
|
|
||
|
<%# css list %>
|
||
|
<% if (theme.stylesheets !== undefined && theme.stylesheets.length > 0) { %>
|
||
|
<!-- stylesheets list from _config.yml -->
|
||
|
<% theme.stylesheets.forEach(url => { %>
|
||
|
<link rel="stylesheet" href="<%- url_for(url) %>">
|
||
|
<% }); %>
|
||
|
<% } %>
|
||
|
<%# javascript list %>
|
||
|
<% if (theme.scripts !== undefined && theme.scripts.length > 0) { %>
|
||
|
<!-- scripts list from _config.yml -->
|
||
|
<% theme.scripts.forEach(url => { %>
|
||
|
<script src="<%- url_for(url) %>"></script>
|
||
|
<% }); %>
|
||
|
<% } %>
|
||
|
<%# mathjax support %>
|
||
|
<% if(theme.mathjax.enable!==null&&theme.mathjax.enable===true){ %>
|
||
|
<%# import mathjax method: global or demand %>
|
||
|
<% if(theme.mathjax.import === 'global'){ %>
|
||
|
<%- partial('_plugins/mathjax.ejs') %>
|
||
|
<% } else if(theme.mathjax.import === 'demand'){ %>
|
||
|
<% if (page.mathjax){ %>
|
||
|
<%- partial('_plugins/mathjax.ejs') %>
|
||
|
<% } %>
|
||
|
<% } %>
|
||
|
<% } %>
|