diff --git a/themes/chameleon/layout/_partial/head.ejs b/themes/chameleon/layout/_partial/head.ejs index dec3b60..726d9c0 100644 --- a/themes/chameleon/layout/_partial/head.ejs +++ b/themes/chameleon/layout/_partial/head.ejs @@ -1,36 +1,36 @@ - <% - let title = page.title +<% +let title = page.title - if (is_archive()) { - title = titleCase(config.archive_dir) +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 + 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 +} +%> <% if (title) { %><%= title %> | <% } %><%= config.title %> <%/* 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) %> - <% } %> +<% if (config.feed) { %> + <%- feed_tag() %> +<% } else if (theme.rss) { %> + <%- feed_tag(theme.rss) %> +<% } %> <%/* Favicon */%> <%/* https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs */%> diff --git a/themes/chameleon/layout/_partial/post/nav.ejs b/themes/chameleon/layout/_partial/post/nav.ejs index 37eda79..8429247 100644 --- a/themes/chameleon/layout/_partial/post/nav.ejs +++ b/themes/chameleon/layout/_partial/post/nav.ejs @@ -4,13 +4,7 @@ <% if (post.prev) { %> <%= __('newer') %> -
- <% if (post.prev.title) { %> - <%= post.prev.title %> - <% } else { %> - (no title) - <% } %> -
+
<%= post.prev.title %>
<% } %>