unverbuggt / mkdocs-encryptcontent-plugin

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

mkdocs returns 'Invalid Plugins configuration' when configuring mkdocs.yml #42

Closed Enonya closed 1 year ago

Enonya commented 1 year ago

My mkdocs.yml was like this:

plugins:
  - search
  - encryptcontent:
    title_prefix: '[LOCKED]'
    password_button: True

I'm sure that I have installed the plugin, but when I try to test it locally, mkdocs said:

C:\Users\Administrator\OIdocs>mkdocs serve
ERROR    -  Config value 'plugins': Invalid Plugins configuration
Aborted with 1 Configuration Errors!

But if I write like this:

plugins:
  - search
  - encryptcontent

Then the pages can be built, but there's no password request when I write like this in my markdown files:

---
- password: CwoI2022
---

text.

It will be like this:

QQ图片20230115201707

full mkdocs.yml is here(can be built) and here(cannot be built)

Can anyone help me?

Enonya commented 1 year ago

I've read the document of mkdocs, and change the mkdocs.yml to be like this:

plugins:
  search: {}
  encryptcontent:
    password_button: True

And change the metatag in markdown file like this:

---
password: CwoI2022
---

I don't know why but it works!

image