From 373c03c53ccc4291d965d3ca9f7a2b934aa273c3 Mon Sep 17 00:00:00 2001 From: toshimaru Date: Mon, 18 May 2020 10:16:29 +0900 Subject: [PATCH 1/2] Update libraries - bootstrap 4.4 -> 4.5 - highlight.js: 9.18 patch update --- src/_layouts/default.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/_layouts/default.html b/src/_layouts/default.html index 1a2573a982..e0f744bc36 100644 --- a/src/_layouts/default.html +++ b/src/_layouts/default.html @@ -3,9 +3,9 @@ - + - + @@ -58,9 +58,9 @@ - + - + From f366f4a0c928a842abe6aa35390a96794547b599 Mon Sep 17 00:00:00 2001 From: toshimaru Date: Tue, 19 May 2020 00:34:05 +0900 Subject: [PATCH 2/2] highlight.js: 9.18.1 -> 10.0.3 --- src/_layouts/default.html | 4 ++-- src/assets/js/app.js | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/_layouts/default.html b/src/_layouts/default.html index e0f744bc36..5448a37ab0 100644 --- a/src/_layouts/default.html +++ b/src/_layouts/default.html @@ -5,7 +5,7 @@ - + @@ -60,7 +60,7 @@ - + diff --git a/src/assets/js/app.js b/src/assets/js/app.js index d93530c8ab..1e1d19aaa3 100644 --- a/src/assets/js/app.js +++ b/src/assets/js/app.js @@ -1,15 +1,17 @@ $(() => { + // anchor-js + anchors.options.visible = 'always'; + anchors.add(); + + // highlight.js + hljs.initHighlighting(); + $(".sidebar-sticky .icon").on("click", function (e) { $(this).siblings("ul").toggle(); this.classList.toggle("icon-opened"); }); - - hljs.initHighlightingOnLoad(); - - anchors.options.visible = 'always'; - anchors.add(); - $(`.sidebar-content a[href='${window.location.pathname}']`) .attr("class", "active-link") - .parents('ul').show(); + .parents('ul') + .show(); });