hexo-theme-amane/layout/common/head.ejs

47 lines
1.7 KiB
Plaintext

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<%
function capitalize (str) { return str.charAt(0).toUpperCase() + str.substring(1).toLowerCase() }
var title = page.title;
if (is_archive()) {
title = capitalize(__('index.archive'));
if (is_month()) {
title += ': ' + page.year + '/' + page.month;
} else if (is_year()) {
title += ': ' + page.year;
}
} else if (is_category()) {
title = capitalize(__('index.category')) + ': ' + page.category;
} else if (is_tag()) {
title = capitalize(__('index.tag')) + ': ' + page.tag;
}
%>
<title><% if (title) { %><%= title %> | <% } %><%= config.title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<%- open_graph({
image: thumbnail(page),
fb_app_id: theme.miscellaneous.open_graph.fb_app_id,
fb_admins: theme.miscellaneous.open_graph.fb_admins,
twitter_id: theme.miscellaneous.open_graph.twitter_id,
google_plus: theme.miscellaneous.open_graph.google_plus,
}) %>
<% if (theme.rss) { %>
<link rel="alternative" href="<%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml" />
<% } %>
<% if (theme.customize.favicon) { %>
<link rel="icon" href="<%- url_for(theme.customize.favicon) %>" />
<% } %>
<%- css('vendor/font-awesome/css/font-awesome.min') %>
<%- css('vendor/open-sans/styles') %>
<%- css('vendor/source-code-pro/styles') %>
<%- css('css/style') %>
<%- js('vendor/jquery/2.1.3/jquery.min') %>
<%- partial('plugin/scripts', { isHead: true }) %>
</head>