blog/themes/chameleon/layout/_partial/head.ejs

58 lines
2.4 KiB
Plaintext

<head>
<meta charset="utf-8">
<%
let title = page.title
if (is_archive()) {
title = titleCase(config.archive_dir)
if (is_month()) {
title += ': ' + page.year + '/' + page.month
} else if (is_year()) {
title += ': ' + page.year
} else if (page.current_url) {
const pageNum = Number(page.current_url.charAt(page.current_url.length - 2))
if (Number.isInteger(pageNum)) title += ': Page ' + pageNum
}
} else if (is_category()) {
title = __('category') + ': ' + page.category
} else if (is_tag()) {
title = __('tag') + ': ' + page.tag
}
%>
<title><% if (title) { %><%= title %> | <% } %><%= config.title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="canonical" href="<%- full_url_for(path) %>">
<%/* Add Open Graph meta tags for easier sharing on social networking sites */%>
<%/* Modified from original source for compatibility with my blog */%>
<%- openGraph() %>
<% if (config.feed) { %>
<%- feed_tag() %>
<% } else if (theme.rss) { %>
<%- feed_tag(theme.rss) %>
<% } %>
<%/* Favicon */%>
<link rel="apple-touch-icon" sizes="180x180" href="<%- url_for('/apple-touch-icon.png') %>">
<link rel="icon" type="image/png" sizes="32x32" href="<%- url_for('/favicon-32x32.png') %>">
<link rel="icon" type="image/png" sizes="16x16" href="<%- url_for('/favicon-16x16.png') %>">
<link rel="icon" type="image/png" sizes="16x16" href="<%- url_for('/favicon-16x16.png') %>">
<link rel="icon" type="image/svg+xml" href="<%- url_for('/svg/favicon.svg') %>">
<link rel="manifest" href="<%- url_for('/site.webmanifest') %>">
<link rel="mask-icon" href="<%- url_for('/safari-pinned-tab.svg') %>" color="#3f72af">
<link rel="shortcut icon" href="<%- url_for('/favicon.ico') %>">
<meta name="apple-mobile-web-app-title" content="<%= config.title %>">
<meta name="application-name" content="<%= config.title %>">
<meta name="msapplication-TileColor" content="#3f72af">
<meta name="msapplication-config" content="<%- url_for('/browserconfig.xml') %>">
<meta name="theme-color" content="#3f72af">
<link rel="sitemap" type="application/xml" title="Sitemap" href="<%- url_for('/sitemap.xml') %>">
<%/* CSS of Chameleon theme */%>
<%- css('/css/chameleon.css') %>
<% if (theme.icons) { %>
<%- css('/libs/forkawesome/css/forkawesome-1.1.7.min.css') %>
<% } %>
</head>