Skip to content

Commit

Permalink
fix: description & keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
lh1me committed Jan 24, 2022
1 parent 953045a commit ba1f63f
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions layout/_partial/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,34 @@

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

<%
var title = page.title;
if (is_archive()){
title = __('Archive');
if (is_month()){
title += ' | ' + page.year + '/' + page.month;
} else if (is_year()){
title += ' | ' + page.year;
}
title = __('Archive');
if (is_month()){
title += ' | ' + page.year + '/' + page.month;
} else if (is_year()){
title += ' | ' + page.year;
}
} 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">

<meta name="description" content="<%= page.description || page.excerpt || config.description || config.title %>">
<meta name="keywords" content="<%= page.keywords || config.keywords %>">

<% if (config.aomori_google_site && config.aomori_google_site.enable){ %>
<meta name="google-site-verification" content="<%= config.aomori_google_site.id %>" />
<meta name="google-site-verification" content="<%= config.aomori_google_site.id %>" />
<% } %>

<% if (config.aomori_search_algolia){ %>
<%- algolia_search_config() %>
<%- algolia_search_config() %>
<% } %>

<% if (config.rss){ %>
Expand All @@ -38,7 +42,7 @@
<% } %>

<% if (config.aomori_favicon){ %>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22><%- config.aomori_favicon %></text></svg>">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22><%- config.aomori_favicon %></text></svg>">
<% } %>

<% if (config.aomori_gitalk){ %>
Expand Down

0 comments on commit ba1f63f

Please sign in to comment.