jimporter / mike

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

Versioning doesn't work if `site_dir` is set to a custom folder #17

Closed masci closed 4 years ago

masci commented 4 years ago

The folder containing builds' output defaults to site but it can be changed to something else in mkdocs.yml using site_dir. In my case that param was set to public and Mike wasn't able to build the versioned docs tree in the gh-pages branch with no errors.

I think the problem might be in this function that assumes output must be collected from a directory called site.

I can change my output dir to site so it's not a big deal but the error is non obvious.

jimporter commented 4 years ago

Hm yeah, that's a problem. It should be fixable, but it'll take a bit of work since currently, mike only looks at the mkdocs.yml file to add the "extras". I'll need to add in the ability to read the config before we tell mkdocs to build...

I'll try to get a patch for this done in the next few days, and then probably publish a new version shortly thereafter since #16 is also waiting to be in a release.

jimporter commented 4 years ago

Ok, v0.5.2 is on PyPI with this fix.