mirror of https://github.com/jkjoy/sunpeiwen.git
37 lines
1.3 KiB
Plaintext
37 lines
1.3 KiB
Plaintext
<%
|
|
var pageTitle = page.title || config.subtitle || '';
|
|
if (is_archive()) pageTitle = ' Archives ';
|
|
if (is_tag()) pageTitle = 'Tag: ' + page.tag;
|
|
if (is_category()) pageTitle = 'Category: ' + page.category;
|
|
if (is_month()) pageTitle += ': ' + page.month + '/' + page.year;
|
|
if (is_year()) pageTitle += ': ' + page.year;
|
|
pageTitle += ' [ ' + config.title + ' ]';
|
|
%>
|
|
|
|
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title><%=pageTitle%></title>
|
|
<% if (theme.favicon){ %>
|
|
<link rel="icon" href="<%- url_for(theme.favicon) %>">
|
|
<% } %>
|
|
<% 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="<%= page.keywords %>,<%- config.keywords %>">
|
|
<% } %>
|
|
<% if (theme.rss){ %>
|
|
<link rel="alternate" href="<%= url_for(theme.rss) %> " title="<%= config.title %>" type="application/atom+xml">
|
|
<% } %>
|
|
<% if (theme.stylesheets !== undefined && theme.stylesheets.length > 0) { %>
|
|
<% theme.stylesheets.forEach(url => { %>
|
|
<link rel="stylesheet" href="<%= url_for(url) %>">
|
|
<% }); %>
|
|
<% } %> |