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

How do I use mike without git? #80

Closed mikehearn closed 2 years ago

mikehearn commented 2 years ago

I have a good old fashioned CI job that uses mkdocs build --site-dir and that serves the resulting directory. Now I'd like to have versioned docs, but mike seems very keen on only pushing generated HTML to git repos. I don't need that, I'm not using github pages. I just need it to write some files to a directory. Is there a way to do this?

jimporter commented 2 years ago

The short answer is: You can't.

The longer answer is: mike is just a wrapper on top of Git commands to make it easier to put generated docs in the right spot on a Git branch. Without that, all mike is is a tiny bit of JS/CSS. If your goal is just to put an MkDocs build into a particular directory, then you should just use vanilla MkDocs (plus maybe copying the version selector JS from mike and tweaking it for your setup).

See also https://github.com/jimporter/mike/issues/77#issuecomment-949767624.