Using mkdocs with mike.
mike runs mkdocs to create versions in subdirectories, but in a separate branch (by default
gh_pagesbut can be any).
That ‘deploy’ branch is the entire website, complete with index.html (that redirects to a chosen version subdir), plus as many subdirs each with a built mkdocs site.
You define versions to be listed, which is the default, aliases for them (e.g.
latesthave the same content).
If you keep your documentation version sets in separate github branches (say,
2.0) and run
mike deployin each branch, you will get subdirs
/2.0/in your target (‘deploy’) branch.
Netlify builds want to know where the built subdir is in the same branch.
But I want a build (say, for
2.0 branch) to be:
- build command:
mike deploy -b somebranch 2.0
- publish BRANCH (not directory):
somebranchis the multi-version content for the site.
(I would have to figure out how to parameterise the version to match the updated github branch, but there is a bigger initial question.)
Is this possible?
mkdocs + material + mike gives a standard-tool approach to versioning and a menu to implement it on the site.