-
Notifications
You must be signed in to change notification settings - Fork 19
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
Allow user to set classes for ul, li, and a #16
Comments
Hi it used to work with bootstrap3. I only upgraded all my pelican stuff (or at least tried to) to bootstrap 4 this week. I will have to look into it, but I don't think I will add it in this plugin. For bootstrap specific tagging purposes I wrote pelican-bootstrapify. |
Thanks! I use pelican-bootstrapify, but it targets article.content and page.content, while the toc lives outside of that. The suggested functionality to add classes would not be bootstrap specific, buy cater for any classes that need to be added. |
Same problem here. I like I tried subclassing My current workaround is a hard-coded patch to the local version of the plugin expanding the |
Hi, really cool and functional plugin! I've started to use it to create a scrollspy-like TOC on the side of an article. Works great, but I currently have to use jQuery to have the TOC look like a Bootstrap nav:
Being a static website generator, it would be a lot better though if those classes could be passed to the plugin via the Pelican settings, so the TOC is rendered with those classes. Something like:
I've started an implementation, but got lost in passing parameters from function to function. There also too many design decisions involved, which I rather not take. 😄 But some thoughts:
ul
,li
, anda
is sufficient. Optionally, classes could be supported for the wrappingdiv
.<li class="">....</li>
).toc-href
class for links. Personally, I would also remove thetitle
attribute for links."TOC_A": [1, "test"]
), the list concatenation should convert to strings first', '.join(map(str, content.settings[TOC_KEY]['TOC_A']))
Just a thought.
The text was updated successfully, but these errors were encountered: