Skip to content

Commit 0bfee79

Browse files
committed
update readme
1 parent b17e4c6 commit 0bfee79

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The content is encrypted with AES-256 in Python using PyCryptodome, and decrypte
3030
* [Installation](#installation)
3131
* [Usage](#usage)
3232
* [Global password protection](#global-password-protection)
33-
* [Secret from environment](#secret-from-environment)
33+
* [Secret from environment](#secret-from-environment) **(UPDATE)**
3434
* [Customization](#default-vars-customization)
3535
* [Features](#features)
3636
* [HighlightJS support](#highlightjs-support) *(default)*
@@ -63,7 +63,7 @@ Install the package from source with pip:
6363
```bash
6464
cd mkdocs-encryptcontent-plugin/
6565
python setup.py sdist bdist_wheel
66-
pip install dist/mkdocs_encryptcontent_plugin-2.4.4-py3-none-any.whl
66+
pip install dist/mkdocs_encryptcontent_plugin-2.4.5-py3-none-any.whl
6767
```
6868

6969
Enable the plugin in your `mkdocs.yml`:
@@ -104,7 +104,6 @@ This process is in two steps:
104104

105105
1. First, you need to make an environment variable with your global password accessible at runtime (via any CI/CD pipeline or by setting it yourself in your environment).
106106

107-
108107
2. Then in the mkdocs.yml file, instead of specifying a global password, just set the `use_secret` field with your environment variable name, e.g. in case my secret is stored in the `ENCRYPTCONTENT_PASSWORD` variable:
109108

110109
``` yaml
@@ -114,7 +113,12 @@ plugins:
114113
```
115114

116115
> **NOTE** Keep in mind that if the `use_secret:` configuration is set, it will always be used even if you have also set a global password with the `global_password` variable.
116+
>
117+
> If this environment variable is empty or missing, then the build will fail to prevent the unwanted leak of information.
118+
> However this can be converted into a warning by setting `ignore_missing_secret: true`.
119+
> Use this only if you use a secret environment variable for production and a plain password for testing. You have been warned.
117120

121+
> **NEW** The meta tag `use_secret` can also be set to achieve the same functionality on page level.
118122

119123
### Default vars customization
120124

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='2.4.4',
14+
version='2.4.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)