From d47a131ca03b813b26345c752d41cc8999a646ce Mon Sep 17 00:00:00 2001
From: amzrk2
Date: Fri, 29 May 2020 16:14:13 +0800
Subject: Fix highlight.js
---
layouts/partials/head.html | 4 ++--
layouts/partials/scripts-end.html | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
(limited to 'layouts/partials')
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index c306ade..85b77cc 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -41,7 +41,7 @@
{{ if .Site.Params.useResourceCDN }}
-
+
@@ -52,7 +52,7 @@
-
+
{{ end }}
diff --git a/layouts/partials/scripts-end.html b/layouts/partials/scripts-end.html
index d82ab58..ea37e5c 100644
--- a/layouts/partials/scripts-end.html
+++ b/layouts/partials/scripts-end.html
@@ -72,13 +72,15 @@
background: mediumTheme
});
- // init highlight.js
hljs.initHighlightingOnLoad();
// remove empty ul in toc if article only have ## and ###
if ($('.sidebar-toc ul ul').length > 0 && $('.sidebar-toc ul ul li').text() === '') {
$('.sidebar-toc ul ul').hide();
}
+
+ // init highlight.js
+ hljs.initHighlighting();
{{ if and (and (ne .Params.noComments true) (.IsPage)) (.Site.Params.utterancesRepo) }}
--
cgit v1.2.3