Skip to content

Commit 0bcc1aa

Browse files
committed
avoid flashing of mkdocs-decrypted-content before decryption.
show it after init_decryptor.
1 parent 3a99d71 commit 0bcc1aa

File tree

8 files changed

+31
-16
lines changed

8 files changed

+31
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Install the package from source with pip:
106106
```bash
107107
cd mkdocs-encryptcontent-plugin/
108108
python setup.py sdist bdist_wheel
109-
pip install --force-reinstall --no-deps dist/mkdocs_encryptcontent_plugin-3.0.4-py3-none-any.whl
109+
pip install --force-reinstall --no-deps dist/mkdocs_encryptcontent_plugin-3.0.5-py3-none-any.whl
110110
```
111111

112112
Enable the plugin in your `mkdocs.yml`:

documentation/decrypt-form.tpl.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div id="mkdocs-encrypted-content" style="display:none">{{ ciphertext_bundle }}</div>
2-
<div id="mkdocs-decrypted-content">
2+
<div id="mkdocs-decrypted-content" style="display:none">
33
<form id="mkdocs-decrypt-form"{% if form_class %} class="{{ form_class }}"{% endif %}>
44
<h1>{{ summary }}</h1>
55
{% if encryption_info_message %}<p>{{ encryption_info_message }}</p>{% endif %}

documentation/docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Install the package from source with pip:
1313
```bash
1414
cd mkdocs-encryptcontent-plugin/
1515
python setup.py sdist bdist_wheel
16-
pip install --force-reinstall --no-deps dist/mkdocs_encryptcontent_plugin-3.0.4-py3-none-any.whl
16+
pip install --force-reinstall --no-deps dist/mkdocs_encryptcontent_plugin-3.0.5-py3-none-any.whl
1717
```
1818

1919
Enable the plugin in your `mkdocs.yml`:

documentation/mkdocs_material.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ theme:
4141
# - 'assets/javascripts/mermaid.min.js'
4242

4343
nav:
44-
- 'index.md'
44+
- Encryptcontent plugin V3: 'index.md'
4545
- 'installation.md'
4646
- 'usage.md'
4747
- Features:
4848
- 'features/index.md'
49-
- 'features/modifypages.md'
50-
- 'features/search.md'
51-
- 'features/jsext.md'
52-
- 'features/security.md'
49+
- Modify pages: 'features/modifypages.md'
50+
- Search encryption: 'features/search.md'
51+
- Javascript extensions: 'features/jsext.md'
52+
- Security: 'features/security.md'
5353
- How does it work?: 'explanations.md'
5454
- Test bench:
5555
- 'testbench/index.md'
@@ -93,6 +93,7 @@ plugins:
9393
Passwords: Passwörter
9494
Test bench: Testaufbau
9595
User/Password: Benutzername/Passwort
96+
Encryptcontent plugin V3: Encryptcontent Plugin V3
9697
site_name: MkDocs Encryptcontent Plugin V3
9798
reconfigure_material: true
9899
reconfigure_search: true
@@ -137,10 +138,15 @@ plugins:
137138
reload_scripts:
138139
- '#autostart'
139140
password_file: 'passwords.yml'
141+
additional_storage_file: 'additional_storage.yaml'
140142
sharelinks: true
143+
sharelinks_incomplete: true
141144
#kdf_pow: 4
142145
webcrypto: true
146+
esm: true
143147
sign_files: 'encryptcontent-plugin.json'
148+
cache_file: 'encryptcontent.cache'
149+
sharelinks_output: 'sharelinks.txt'
144150
hash_filenames:
145151
extensions:
146152
- 'png'
@@ -149,6 +155,7 @@ plugins:
149155
- 'svg'
150156
except:
151157
- 'logo.svg'
158+
insecure_test: !ENV [MKDOCS_ENCRYPTCONTENT_INSECURE_TEST, false]
152159

153160
repo_url: https://github.com/unverbuggt/mkdocs-encryptcontent-plugin
154161

documentation/mkdocs_mkdocs.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ theme:
2121
# - 'assets/javascripts/mermaid.min.js'
2222

2323
nav:
24-
- 'index.md'
24+
- Encryptcontent plugin V3: 'index.md'
2525
- 'installation.md'
2626
- 'usage.md'
2727
- Features:
2828
- 'features/index.md'
29-
- 'features/modifypages.md'
30-
- 'features/search.md'
31-
- 'features/jsext.md'
32-
- 'features/security.md'
29+
- Modify pages: 'features/modifypages.md'
30+
- Search encryption: 'features/search.md'
31+
- Javascript extensions: 'features/jsext.md'
32+
- Security: 'features/security.md'
3333
- How does it work?: 'explanations.md'
3434
- Test bench:
3535
- 'testbench/index.md'
@@ -73,6 +73,7 @@ plugins:
7373
Passwords: Passwörter
7474
Test bench: Testaufbau
7575
User/Password: Benutzername/Passwort
76+
Encryptcontent plugin V3: Encryptcontent Plugin V3
7677
site_name: MkDocs Encryptcontent Plugin V3
7778
reconfigure_material: false
7879
reconfigure_search: true
@@ -118,10 +119,15 @@ plugins:
118119
reload_scripts:
119120
- '#autostart'
120121
password_file: 'passwords.yml'
122+
additional_storage_file: 'additional_storage.yaml'
121123
sharelinks: true
124+
sharelinks_incomplete: true
122125
#kdf_pow: 4
123126
webcrypto: true
127+
esm: true
124128
sign_files: 'encryptcontent-plugin.json'
129+
cache_file: 'encryptcontent.cache'
130+
sharelinks_output: 'sharelinks.txt'
125131
hash_filenames:
126132
extensions:
127133
- 'png'
@@ -130,6 +136,7 @@ plugins:
130136
- 'svg'
131137
except:
132138
- 'logo.svg'
139+
insecure_test: !ENV [MKDOCS_ENCRYPTCONTENT_INSECURE_TEST, false]
133140

134141
repo_url: https://github.com/unverbuggt/mkdocs-encryptcontent-plugin
135142

encryptcontent/decrypt-contents.tpl.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@ function base64url_decode(input) {
611611
decryptor_reaction(content_decrypted, password_input, decrypted_content);
612612
}
613613
});
614+
decrypted_content.style.display = '';
614615
}
615616

616617
{%- if material %}
@@ -625,4 +626,4 @@ if (document.readyState === "loading") {
625626
// `DOMContentLoaded` has already fired
626627
init_decryptor();
627628
}
628-
window["init_decryptor"] = init_decryptor;
629+
window["init_decryptor"] = init_decryptor;

encryptcontent/decrypt-form.tpl.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div id="mkdocs-encrypted-content" style="display:none">{{ ciphertext_bundle }}</div>
2-
<div id="mkdocs-decrypted-content">
2+
<div id="mkdocs-decrypted-content" style="display:none">
33
<form id="mkdocs-decrypt-form"{% if form_class %} class="{{ form_class }}"{% endif %}>
44
<h1>{{ summary }}</h1>
55
{% if encryption_info_message %}<p>{{ encryption_info_message }}</p>{% endif %}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def read(fname):
1111

1212
setup(
1313
name='mkdocs-encryptcontent-plugin',
14-
version='3.0.4',
14+
version='3.0.5',
1515
author='unverbuggt',
1616
author_email='[email protected]',
1717
description='A MkDocs plugin that encrypt/decrypt markdown content with AES',

0 commit comments

Comments
 (0)