mirror of https://gitlab.com/curben/blog
59 lines
2.7 KiB
Plaintext
59 lines
2.7 KiB
Plaintext
<head>
|
|
<meta charset="utf-8">
|
|
<%- metaGenerator() %>
|
|
<%
|
|
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">
|
|
<%/* Add Open Graph meta tags for easier sharing on social networking sites */%>
|
|
<%/* Modified from original source for compatibility with my blog */%>
|
|
<%- openGraph() %>
|
|
<% if (theme.rss) { %>
|
|
<link rel="alternate" href="<%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml">
|
|
<% } %>
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
|
<link rel="manifest" href="/site.webmanifest">
|
|
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#132873">
|
|
<link rel="shortcut icon" href="/favicon.ico">
|
|
<meta name="apple-mobile-web-app-title" content="<%- theme.nickname %>">
|
|
<meta name="application-name" content="<%- theme.nickname %>">
|
|
<meta name="msapplication-TileColor" content="#603cba">
|
|
<meta name="msapplication-config" content="/browserconfig.xml">
|
|
<meta name="theme-color" content="#ffffff">
|
|
<link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap.xml">
|
|
|
|
<%/* Fallback function for SRI */%>
|
|
<%- addJs('/js/sri.min.js') %>
|
|
|
|
<%/* Polyfill for <img loading="lazy"> */%>
|
|
<% if (is_post()) { %>
|
|
<%- addJs({ src: 'https://cdn.statically.io/gh/mfranzke/loading-attribute-polyfill/65fca968/loading-attribute-polyfill.min.js', 'data-sri-fallback': '/js/loading-attribute-polyfill.min.js', integrity: 'sha384-8jTDDmc3bqX0o3YImTHy8PKVewXMkZLzo1aXpDhU3ezHoimhZxF5psMm7PjKnSt9', crossorigin: 'anonymous'}) %>
|
|
<% } %>
|
|
|
|
<%- addCss('/css/typing.css') %>
|
|
|
|
<% if (theme.icons) { %>
|
|
<%- addCss({ href: 'https://cdn.statically.io/libs/fork-awesome/1.1.7/css/fork-awesome.min.css', 'data-sri-fallback': '/forkawesome/css/fork-awesome.min.css', integrity: 'sha384-mByhW6NjnxyShh67P9+fepUvYSd7Uz/qV6e2u4kA2Fi4ZkjXxIP2mRkyK9dwK24W', crossorigin: 'anonymous' }) %>
|
|
<% } %>
|
|
</head>
|