-
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: Hide the internal page ToC when not logged in. #9
Comments
I have tried several versions of this feature on a branch here feature/encrypt_toc I am not satisfied with the operation with BS4, but I haven't found something more simple / functional with different themes ... Could you, please, give me a feedback before I consider merging this code on the branch master. |
So I got it working after a while. At first I tried adding the id to the nav element in my theme. Then I recalled that you set the id on a div, so after a quick block extension it worked. For Material the
Pretty darn easy. Now I just gotta fix it for mobile as well, but it works! |
And there I've got it working for mobile. Set that the page ToC in the mobile nav is always removed if |
Thank you very much for this feedback. Indeed I forgot the management of mobile versions .. However, even if it's okay for you, I want to try something to fix this problem. Maybe i can do a feature that will encrypt any part of your site. encrypt_something:
- <html tag>: <uniq id name>
- div: mkdocs-encryptcontent-div-id
- nav: mkdocs-encryptcontent-nav-id For each of the listed elements, the HTML content would be encrypted, then hide with a hidden style. I'm gonna try to do this this afternoon or tomorrow. |
I made some change, still on feature\encrypt_toc even though the feature is completely different now. I admit it's much more complex than before ... but I think it's much more flexible and interesting. I did not increase the version number of the plugin. |
I tried the new setup, at least for the nav and yea, that solves all my issues without having to modify my |
The links are broken. 😢 |
I tried to use I just want the feature like you said:
|
The documentation is here: documentation. If you still want help after consulting the documentation, or if you encounter technical problems in use, you should open a new issue on git rather than comment on an already closed one. Also remember to give us basic useful information to reproduce / diagnose your case, such as:
|
Even when not logged in, the interal ToC of a page is fully visible. Perhaps it should be hidden with the rest of the content as well.
Current behaviour:
![1-current-behaviour-not-logged-in](https://user-images.githubusercontent.com/22232681/90252022-12ec3f80-de3f-11ea-8cf1-270ddc33d704.png)
Suggested behaviour:
![2-suggested-behaviour-not-logged-in](https://user-images.githubusercontent.com/22232681/90252032-1a134d80-de3f-11ea-9875-c9feb91fa3fd.png)
Used package versions:
Python:
3.8.3
MkDocs:
1.1.2
Material:
5.5.3
mkdocs-encryptcontent-plugin:
0.0.3
The text was updated successfully, but these errors were encountered: