Fix: Only closes sidebar if is visible when clicking a link
MODIFY
website/static/js/index.js
website/static/js/index.js
@@ -9,7 +9,14 @@ tocbot.init({
headingSelector: 'h1, h2, h3',
hasInnerContainers: true,
collapseDepth: 3,
- onClick: mobileToggleEvent,
+ onClick: function(event){
+
+ //only call when on mobile
+ if(toc.classList.contains('visible')){
+ mobileToggleEvent(event);
+ }
+
+ },
headingObjectCallback: function (def, domElement) {
def.textContent = domElement.innerText;
return def;

Fix: Only closes sidebar if is visible when clicking a link