jimporter / mike

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

Does Mike work when without GitHub? (self-hosting) #145

Closed jgarte closed 1 year ago

jgarte commented 1 year ago

Hi,

Does Mike work when without GitHub? (self-hosting)

jimporter commented 1 year ago

If you upload the contents of the gh-pages branch, you could do it, but I don't recommend it. See also #102.

jgarte commented 1 year ago

Hi, Thanks for the reply.

The issue is that I can't deploy my website to GitHub Pages for the needs of the project I am working on.

Is there an alternative MkDocs tool that you can recommend that is agnostic to using GitHub Pages as the deploy strategy?

jimporter commented 1 year ago

The issue is that I can't deploy my website to GitHub Pages for the needs of the project I am working on.

You need to have a branch in your repository to hold your compiled documentation, since that's how mike keeps older versions around unchanged. However, you can use any branch you like for this; it doesn't need to be gh-pages.

Is there an alternative MkDocs tool that you can recommend that is agnostic to using GitHub Pages as the deploy strategy?

No, but I really hope someone will write one. Ultimately, mike is just a hack. I wanted a system that treats compiled documentation as an immutable release artifact and which could use Github Pages as a host, since it's free. With access to a "real" web server, I think the better solution is to take advantage of its capabilities and get rid of all the gh-pages logic that mike uses. For example, you could probably just rsync the compiled docs to the right folder on the server, and then you'd just need a bit of logic for managing the versions.json file, which could probably be copied from mike's source code.

I haven't written something like that, but I expect it would be considerably simpler than mike, since mike needs to jump through quite a few hoops to work with Git.

jimporter commented 1 year ago

Another issue you can look at that summarizes this situation: #139.