diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs
index f3ba48d..a3834f9 100755
--- a/layout/_partial/head.ejs
+++ b/layout/_partial/head.ejs
@@ -36,18 +36,21 @@
-
-
- <% if (config.import && config.import.link){ %>
- <% (config.import.link||[]).forEach(function(item){ %>
- type="<%= item.type %>"<% } %> <% if (item.sizes){ %>sizes="<%= item.sizes %>"<% } %> href="<%- item.href %>" <% if (item.color){ %>color="<%= item.color %>"<% } %>>
- <% }) %>
- <% } %>
-
<% if (config.import && config.import.meta){ %>
<% (config.import.meta||[]).forEach(function(item){ %>
-
+
+ <% }) %>
+ <% } %>
+
+ <% if (config.import && config.import.link){ %>
+ <% (config.import.link||[]).forEach(function(item){ %>
+ type="<%= item.type %>"<% } %>
+ <% if (item.sizes){ %> sizes="<%= item.sizes %>"<% } %>
+ <% if (item.media){ %> media="<%= item.media %>"<% } %>
+ <% if (item.hreflang){ %> hreflang="<%= item.hreflang %>"<% } %>
+ <% if (item.color){ %> color="<%= item.color %>"<% } %>>
<% }) %>
<% } %>
@@ -60,11 +63,6 @@
<%- css('style.css') %>
<% } %>
- <% if (config.import && config.import.google_fonts && config.import.google_fonts.length > 0){ %>
-
-
- <% } %>
-
diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs
index 3863cc2..5281179 100755
--- a/layout/_partial/scripts.ejs
+++ b/layout/_partial/scripts.ejs
@@ -11,24 +11,6 @@
}, false)
-<% if (theme.search && theme.search.enable) { %>
-
-<% } %>
-
-
<% if (config.import && config.import.js == true) { %>
<%- js([theme.theme_info.cdn + 'js/app.js', theme.theme_info.cdn + 'js/search.js']) %>
<% } else if (config.import && config.import.js && config.import.js.length > 0) { %>
@@ -37,72 +19,85 @@
<%- js(['js/app.js', 'js/search.js']) %>
<% } %>
+<% if (theme.search && theme.search.enable) { %>
+
+<% } %>
-<% if (page.comments) { %>
- <% if (config.disqus_shortname){ %>
-
- <% } %>
- <% if (config.livere_uid){ %>
-
- <% } %>
- <% if (config.valine){ %>
- <% if (config.valine.enable && config.valine.app_id && config.valine.app_key){ %>
-
- <% if (config.import && config.import.js == true) { %>
-
- <% } else { %>
- <%- js('js/volantis.js') %>
- <% } %>
-
-
- <% } %>
+<% if ((page.layout == 'post' && page.comments != false) || page.comments == true) { %>
+ <% if (config.disqus_shortname){ %>
+
+ <% } %>
+ <% if (config.livere_uid){ %>
+
+ <% } %>
+ <% if (config.valine){ %>
+ <% if (config.valine.enable && config.valine.app_id && config.valine.app_key){ %>
+
+ <% if (config.import && config.import.js == true) { %>
+
+ <% } else { %>
+ <%- js('js/volantis.js') %>
+ <% } %>
+
<% } %>
+ <% } %>
<% } %>
-
-
<% if (config.leancloud_visitors && config.leancloud_visitors.app_id && config.leancloud_visitors.app_key) { %>
diff --git a/layout/_third-party/comments.ejs b/layout/_third-party/comments.ejs
index 5c0885c..8b1f5f2 100644
--- a/layout/_third-party/comments.ejs
+++ b/layout/_third-party/comments.ejs
@@ -1,44 +1,44 @@
<% if (page && ((theme.recommended_posts && theme.recommended_posts.autoDisplay == false && page.recommended_posts != false) || (page.comments && (config.disqus_shortname || config.livere_shortname || config.valine)) )) { %>
-