BACKGROUND
-
Using mkdocs with mike.
-
mike runs mkdocs to create versions in subdirectories, but in a separate branch (by default
gh_pages
but 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.
2.9
andlatest
have the same content). -
If you keep your documentation version sets in separate github branches (say,
1.0
,2.0
) and runmike deploy
in each branch, you will get subdirs/1.0/
and/2.0/
in your target (‘deploy’) branch.
PROBLEM
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):
somebranch
Everything in
somebranch
is 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.)
QUESTION
Is this possible?
ADDENDUM: WHY
mkdocs + material + mike gives a standard-tool approach to versioning and a menu to implement it on the site.