-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Display permalinks on hover #95
Conversation
Thoughts about the anchor icon? TBH, I'm not a huge fan. I do like the on hover behavior and ability to have a header perma link. |
Hehe, no problem! It can be changed in mkdocs.yml: markdown_extensions:
- toc:
permalink: # Some Font Awesome icon or True |
Is it possible to change the default that is used in this project without the yml configuration edit by a user? Do you know if we can add it to the https://github.com/chrissimpkins/cinder/blob/master/cinder/mkdocs_theme.yml? |
I'm not sure it's possible. Theme configurations are loaded under "theme" ( |
Would it be possible for the |
I did some more tests:
Note that content wiggles when h6 is hovered. If
In any case, one user can modify the css with "extra_css" configuration. Let me know what you think. |
My 2 cents is that the link icon more intuitively indicates that this is a link to the header. I'm not opposed to the pilcrow symbol. It is likely used frequently enough out there for this purpose. As I mentioned before, I would really prefer not to show an anchor icon by default and force users to explicitly edit configuration files to use something else. If the markdown_extensions > toc > permalink setting is not present in a user configuration file, does this mean that they get no permalinks? Or is the new behavior always on hover permalinks with anchor icon default that can be modified to a different icon if you specify the permalink setting (True or icon name) in the yaml config file? |
Configuration is on the user side. Without I'm not sure if I prefer the icon or the symbol. |
This approach sounds good to me. Willing to merge this. |
@mmatyas any thoughts about the two approaches that Antoine posted above? |
Sure, that sounds fine to me as well! |
So, which one should I go for? Style-wise I have a small preference for the symbol. If it can help, MkDocs default themes use a Font Awesome icon and Material theme a symbol. On a side note, after this PR is completed we should update MkDocs themes page (update screenshot and add badge: https://img.shields.io/pypi/dm/mkdocs-cinder). |
Which one is the symbol? The pilcrow? |
Yes, the pilcrow. Sorry if it was not clear. |
Sounds good to me. Let's go with that approach. |
This looks great Antoine. I am updating the documentation with these changes but I can't figure out how to activate the Font Awesome icons. When I try to enter a FA icon name, the hover link shows me the string that I enter, not an icon. |
Reviewing the conversation, it looks like you indicated that with this approach we cannot use FA icons. Only the pilcrow. I think that I misunderstood. Will merge and push this release with documentation of the pilcrow only. If it is possible to use FA icons too, please let me know and we will update the docs. |
Released in v1.1.0 https://github.com/chrissimpkins/cinder/releases/tag/v1.1.0 Thank you very much for the changes here Antoine! |
I activated this on our documentation site too btw 👍 |
Indeed, there's no |
I'm happy with where we are now! I was just trying to figure out how to document FA icon use and kept getting the string that I entered into the configuration file as the permalink 😀 |
Closes issue #37. It's a change in behavior.
Result:
Removed css section "before" had quite an evolution in mkdocs theme. I took the final version (see PR 1931).
Note styles used for "headerlink" class. "font-family" and "font-weight" are the same as on "fa" class.