-
Notifications
You must be signed in to change notification settings - Fork 16
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
Feature request: Allow for adding class in mkdocs.yml #7
Comments
Hey, Indeed it's a good idea, but in the current way the plugin works, I don't really inject any html apart from the template. Since I don't want to have to parse HTML, I've found a workaround that seems to meet your expectations. By adding additional HTLM tags around the text in the case of an encrypted article/page, it becomes possible to customize its style. I added the following changes here: issue #7 Tell me if this is enough or if you have a cleaner method to improve the process. Thanks. |
That is good enough for me indeed! Thanks! |
Thanks for your feedback. |
Hey @CoinK0in, just noticed that the plugin now forces the prefix (and css class) on all items in the ToC, even if no password is set on any file. Should I open a new issue for this? |
It looks like a mistake, my bad sorry. There is still a problem with the method of adding HTML tags directly in the title. |
I changed the behavior of this feature. Modification are done in this commit : d2635a3 Tell me if it's still OK for you. |
Ok so after spending a lot of time trying to parse the HTML generated by the pages properly, I gave up. 😕 I found a much simpler method to answers this demand and many more i guess. No more HTML parsing 🥰 |
Ah! Well that's a pretty smart method, I'll give it a look later today. Thanks for all the effort put in to my quite personal requests 😄 |
@CoinK0in Don't know if I'm missing something but when I try to upgrade using |
Sorry my bad, forget to push new version on PyPi.org. |
Nice! Works as intended on my end! |
Great, thanks for your feedback. I close this one. |
Hi!
I'd like to make a feature request about the ability to add a CSS-class to the ToC-entries of locked files. This would enable users to add things as SVG-icons, see example, or highlight locked files rathern than a forced prefix-text. The CSS-class could either be fixed, or as with the prefixed text, variable.
The following example is made with just CSS and addition of a class using the inspector. The icon used is bundled with Material for MkDocs.
The CSS:
The HTML-injection:
The result:
![mkdocs-encrypt-content-icon](https://user-images.githubusercontent.com/22232681/90235273-4fa93e00-de21-11ea-929a-675d2faa7a9e.png)
Configuration suggestion:
The text was updated successfully, but these errors were encountered: