unverbuggt / mkdocs-encryptcontent-plugin

A MkDocs plugin that encrypt/decrypt markdown content with AES
https://unverbuggt.github.io/mkdocs-encryptcontent-plugin/
MIT License
130 stars 16 forks source link

Question: Protect one page? #23

Closed e5k closed 2 years ago

e5k commented 2 years ago

Hey,

Sorry but I don't quite get how to protect one single page with a meta tag. Could you provide an example? Thanks a lot

CoinK0in commented 2 years ago

Do not define the "global_password" variable in your mkdocs.yml config file. As result, your articles / pages are not encrypted by default. Then add on each articles / pages that you want to be protected, the header : password: <your password>.

More concretely, in your mkdocs.yml file :

[ ... ]
plugins:
  - search: {}
  - encryptcontent: {}
[ ... ]

In your docs/article_n1.md :

password: <your_password>

# Title

Default text ... continue article
e5k commented 2 years ago

As simple as that :) Thanks a lot for the fast answer!