From c6c4d62d586c55794963ea21c4efb0f172d7e5a6 Mon Sep 17 00:00:00 2001 From: neoFelhz Date: Fri, 16 Jun 2017 12:20:11 +0800 Subject: [PATCH] feat(head): minor changes of dns-prefetch - split the dns-prefetch - add `chart.google.com` - add `custom_font_host` --- layout/_partial/config_dnsprefetch.ejs | 44 ++++++++++++++++++++++++++ layout/_partial/head.ejs | 39 +---------------------- 2 files changed, 45 insertions(+), 38 deletions(-) create mode 100644 layout/_partial/config_dnsprefetch.ejs diff --git a/layout/_partial/config_dnsprefetch.ejs b/layout/_partial/config_dnsprefetch.ejs new file mode 100644 index 000000000..9a2842430 --- /dev/null +++ b/layout/_partial/config_dnsprefetch.ejs @@ -0,0 +1,44 @@ + +<% if(theme.vendors.materialcdn) { %> + +<% } %> +<% if(theme.leancloud.enable === true) { %> + +<% } %> +<% if(theme.busuanzi.enable === true) { %> + +<% } %> +<% if(theme.comment.use == "changyan"){ %> + +<% } %> +<% if(theme.comment.use == "163gentie"){ %> + +<% } %> +<% if(theme.comment.use == "livere"){ %> + +<% } %> +<% if(theme.analytics.use === "baidu") { %> + +<% } %> +<% if(theme.analytics.use === "google") { %> + +<% } %> +<% if(theme.analytics.use === "cnzz") { %> + +<% } %> +<% if(theme.fonts.host === "google") { %> + +<% } %> +<% if(theme.fonts.host === "baomitu") { %> + +<% } %> +<% if(theme.fonts.use === "custom") { %> + +<% } %> +<% if(theme.qrcode.use === "online" && theme.qrcode.enable === "true") { %> + <% if(config.language === "zh-CN") { %> + + <% } else { %> + + <% } %> +<% } %> diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index 73ad0d6b0..126fe700d 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -43,44 +43,7 @@ - - <% if(theme.materialcdn.use === true) { %> - - <%}%> - <% if(theme.leancloud.enable === true) { %> - - <% } %> - <% if(theme.comment.use == "changyan"){ %> - - <% } %> - <% if(theme.comment.use == "163gentie"){ %> - - <% } %> - <% if(theme.comment.use == "livere"){ %> - - <% } %> - <% if(theme.analytics.use === "baidu") { %> - - <% } %> - <% if(theme.analytics.use === "google") { %> - - <% } %> - <% if(theme.analytics.use === "cnzz") { %> - - <% } %> - <% if(theme.busuanzi.enable === true) { %> - - <% } %> - <% if(theme.fonts.host === "google") { %> - - - <% } %> - <% if(theme.fonts.host === "baomitu") { %> - - <% } %> - <% if(theme.qrcode.use === "online" && theme.qrcode.enable === "true") { %> - - <% } %> + <%- partial('_partial/config_dnsprefetch') %>