-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inject_anchors customization feature #43
Comments
I'd specificaly love to be able to at least have a custom class, as i don't use octicons, I use feathericons. |
@toshimaru it seems like you intend to do this anyway? #24 (comment) |
I've submitted a PR for this feature: #75 |
Following up here because I'd like to have this feature as well! |
If nothing else, being able to specify a class on the anchor tags would be useful in enabling things like Bootstrap Scrollspy. The PR above appears to solve this and other problems, though having a config option for the class would still be nice to provide consistency with the custom list item classes. |
I'm still considering whether jekyll-toc supports custom anchor feature. Does it sound good to you? |
Like etsauer mentioned, just having a config option would be really useful if you're trying to maintain the scope of this plugin. Seems like in order to get Bootstrap 4's Scrollspy to work, you really only need '.nav-link' or '.list-group-item' on the TOC anchors. AnchorJS doesn't seem like it has a graceful way of handling this, but I'm not super familiar |
FYI, |
TBH, I'd prefer a solution in the jekyll stage, to minimise in JS - only fuctionality and load times. |
I think it would be great to give user an opportunity to customize injected anchors, for example by adding toc-injected-anchors.html template to _includes directory, the content of which will override default string.
The text was updated successfully, but these errors were encountered: