Closed XhmikosR closed 5 years ago
I'm afraid this wouldn't be possible. Since this project follows the same methodology as jekyll-toc, the problems discussed in https://github.com/allejo/jekyll-toc/issues/3 would apply here.
Since the goal of this project is to be compatible with GH pages, I'm limited to clever-ish string manipulation of HTML so i have no real information on the DOM structure.
No worries, I thought so too :)
We'll work around it.
@allejo: after making the switch I just noticed that the only way to limit the target anchors is their header level.
Do you think it would be possible to add a parent class as a limit, like
.content > h2
?Example: https://twbs-bootstrap4.netlify.com/docs/4.1/utilities/image-replacement/#warning
No big deal if it's hard to add such feature, we'll use JS or CSS to handle this, but I thought I'd ask :)
/CC @MartijnCuppens