jimporter / mike

Manage multiple versions of your MkDocs-powered documentation via Git
BSD 3-Clause "New" or "Revised" License
534 stars 47 forks source link

Fix mkdocs.yaml support #84

Closed kenji-miyake closed 2 years ago

kenji-miyake commented 2 years ago

I found mike doesn't work with mkdocs.yaml.

It seems mkdocs.yaml support is introduced in 494147af622e6ed02216d5f1b58d763cbe546ba8, but it's not working because the default value is set.

How to test


$ git clone git@github.com:kenji-miyake/mike.git
$ cd mike
$ wget https://github.com/squidfunk/mkdocs-material/raw/master/mkdocs.yml
$ pip install -e .
$ mike list
ERROR   -  Config value: 'docs_dir'. Error: The path docs isn't an existing directory.
ERROR   -  Config value: 'plugins'. Error: The "redirects" plugin is not installed
error: Aborted with 2 Configuration Errors!

$ mv mkdocs.yml mkdocs.yaml
$ mike list
error: [Errno 2] No such file or directory: 'mkdocs.yml'; pass --config-file or set --remote/--branch explicitly

$ git checkout fix-mkdocs-yaml-support
$ mike list
ERROR   -  Config value: 'docs_dir'. Error: The path docs isn't an existing directory.
ERROR   -  Config value: 'plugins'. Error: The "redirects" plugin is not installed
error: Aborted with 2 Configuration Errors!
kenji-miyake commented 2 years ago

@jimporter Hello, thank you for developing this useful tool! Could you take a look at this, please? :pray:

jimporter commented 2 years ago

Thanks for the catch! Merged with some fixes and a new test in 611fa48f08467295b3892c4383e68632ff88ab74

kenji-miyake commented 2 years ago

Thanks a lot!