comwes / mkpdfs-mkdocs-plugin

Converts your mkdocs documentation in PDF, to be shared with users
https://comwes.github.io/mkpdfs-mkdocs-plugin
GNU General Public License v3.0
103 stars 36 forks source link

ERROR - Config value: 'plugins'. Error: Invalid config options for the "mkpdfs" plugin. #5

Closed avarone-github closed 5 years ago

avarone-github commented 5 years ago

mkdocs build gives this error:

ERROR - Config value: 'plugins'. Error: Invalid config options for the "mkpdfs" plugin.

when mkdocs.yml has this configuration:

plugins:
    - search
    - mkpdfs:
        - author: Pippo

With this configuration:

plugins:
    - search
    - mkpdfs

no problem. According to the documentation, syntax for the plugin configuration parameter is correct.

comwes commented 5 years ago

Hi @avarone-github,

You are right, there's an error in the documentation. I'll update it as soon as possible. Your should use something like this.:

plugins:
    - search
    - mkpdfs:
        author: Pippo

KR,

cfont commented 4 years ago

Something that I don't think is well documented for this problem is the number of spaces the options must be tabbed in to make this work. For example, just removing the hyphen in front of author did not fix the problem for me although it did change the error message I was receiving.

Instead of getting ERROR - Config value: 'plugins'. Error: Invalid config options for the "mkpdfs" plugin., I was now getting ERROR - Config value: 'plugins'. Error: Invalid Plugins configuration

I was able to resolve this problem by making sure that author, and any other options were tabbed in four (4) spaces rather than my normal two (2) spaces. Hope this helps the next person.

trogper commented 4 years ago

I think mkdocs itself parses the .yml file, so the issue would be suitable in mkdocs repo

comwes commented 4 years ago

Hi @cfont, @trogper

It depends on how the yml configuration has been written. The number of space doesn't matter, my advice is that if you have started using 2/4 spaces you have to stick on that. And most of all forbid using tabs.

I hope this will help you to fix your issue. Take care From Belgium