diff --git a/src/_layouts/default.html b/src/_layouts/default.html index 1a2573a982..5448a37ab0 100644 --- a/src/_layouts/default.html +++ b/src/_layouts/default.html @@ -3,9 +3,9 @@ - + - + @@ -58,9 +58,9 @@ - + - + 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(); });