-
Checklist
How did you create the site?Generated from DescriptionIs there a way to enable all h2~h6 headeres in TOC section? Operations you have already tried
Anything else?No response |
Beta Was this translation helpful? Give feedback.
Answered by
kungfux
Mar 19, 2024
Replies: 2 comments 4 replies
-
@opabravo In case of Create a file !function(){
"use strict";
document.querySelector("main h2, main h3")&&tocbot.init({
tocSelector:"#toc",
contentSelector:".content",
ignoreSelector:"[data-toc-skip]",
headingSelector:"h2, h3, h4, h5, h6",
orderedList:!1,
scrollSmooth:!1
})}(); Since custom scripts are being executed later, it overrides configuration successfully. However, I'm not sure this will work stable for 100%, but it seems to work. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
MrMurdock11
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@opabravo In case of
starter
, there is no way to override javascript files, it seems. However, we can add our own. So, here is the solution for blogs created bystarter
:Create a file
assets\js\custom-toc.js
with the configuration you want:Since custom scripts are being executed later, it overrides configuration successfully. However, I'm not sure this will work stable for 100%, but it see…