You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
106
106
107
-
108
107
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:
109
108
110
109
``` yaml
@@ -114,7 +113,12 @@ plugins:
114
113
```
115
114
116
115
> **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.
117
120
121
+
> **NEW** The meta tag `use_secret` can also be set to achieve the same functionality on page level.
0 commit comments