From 43445049e5513fd7039fef8f52e9ee059a9f36e8 Mon Sep 17 00:00:00 2001 From: 186526 Date: Thu, 31 Dec 2020 21:55:05 +0800 Subject: [PATCH] Update Theme --- themes/suka/layout/_pages/post.ejs | 9 +++++++++ themes/suka/layout/_partial/source/head.ejs | 6 ------ themes/suka/layout/_plugin/comment/valine/main.ejs | 10 ++++++---- themes/suka/source/js/blog-186.js | 8 +++++--- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/themes/suka/layout/_pages/post.ejs b/themes/suka/layout/_pages/post.ejs index f2b2c38..914149b 100644 --- a/themes/suka/layout/_pages/post.ejs +++ b/themes/suka/layout/_pages/post.ejs @@ -1,4 +1,13 @@
+ <%- fragment_cache('head_hljs_css', () => { + let html = ''; + if (theme.vendors.suka.highlight_theme) { + html += css_async(theme.vendors.suka.highlight_theme); + } else if (theme.highlight.theme) { + html += css_async(url_for('css/highlight/' + theme.highlight.theme + '.min.css')); + } + return html; + }) %>
<% if (page.thumbnail) { %>
diff --git a/themes/suka/layout/_partial/source/head.ejs b/themes/suka/layout/_partial/source/head.ejs index 6f8d759..2f8a920 100644 --- a/themes/suka/layout/_partial/source/head.ejs +++ b/themes/suka/layout/_partial/source/head.ejs @@ -37,12 +37,6 @@ <%- partial('_plugin/highlight/prettify/theme') %> <% } %> -<% if (config.highlight.enable) { %> - - <%- partial('_plugin/highlight/hexo-hljs/theme') %> -<% } %> - -