Hello,
I am trying to encrypt just parts of a markdown page and found the "Mix encrypted and normal content" section in the documentation.
I copied and tested the example from the documentation. The encryption works, but as soon as I enter the password and decrypt the content, the form disappears but the teaser is still visible and the protected content is not displayed.
I added the "pymdownx.blocks.html" extension and created a markdown page like in the example of the documentation.
Am I missing something in my configuration?
plugin configuration (mkdocs.yml):
plugins:
- search
- encryptcontent:
password_file: 'passwords.yml'
title_prefix: ''
summary: ''
placeholder: 'Password'
placeholder_user: User
password_button_text: 'ENTER'
decryption_failure_message: 'Wrong user name or password.'
encryption_info_message: 'Legitimation required.'
password_button: True
input_class: 'md-input'
button_class: 'md-button md-button--primary'
hljs: False
arithmatex: False
mermaid2: False
remember_keys: false # keys from keystore will temporarily saved to sessionStorage
remember_password: false # the entered credentials are not saved
remember_prefix: encryptcontent_plugin_ # use different prefixes if other sites are running on the same domain
search_index: 'dynamically' # dynamically encrypt mkdocs search index
webcrypto: true # use browsers webcrypto support
markdown_extensions:
- pymdownx.blocks.html
The Markdown page looks as follows:
title: This page mixes encrypted and normal content
level: classified
inject_id: protected
delete_id: teaser
/// html | div#teaser
## Teaser
You won't believe which secrets this page will unveil.
Find out more after you enter the correct password...
///
/// html | div#protected
## Secret
Well, the princess is another castle.
///
## Unprotected Content
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
Hello, I am trying to encrypt just parts of a markdown page and found the "Mix encrypted and normal content" section in the documentation. I copied and tested the example from the documentation. The encryption works, but as soon as I enter the password and decrypt the content, the form disappears but the teaser is still visible and the protected content is not displayed.
I added the "pymdownx.blocks.html" extension and created a markdown page like in the example of the documentation. Am I missing something in my configuration?
plugin configuration (mkdocs.yml):
The Markdown page looks as follows:
Before decryption:
After decryption: