I am involved in a bunch of open source projects that all have documentation sites on netlify.
A common problem for all of them is that their master
branch contains all the latest changes, including breaking ones and the docs usually follow along. So all of them want to employ semver to their documentation site in a way where upcoming breaking changes don’t leak through to the documentation before it’s relevant.
Furthermore, when dealing with breaking changes in new versions, there are still a lot of users on older major versions. It would be extremely useful to be able to keep the latest version of each major version branch alive as on their documentation site, so you could easily access the version of the documentation relevant to you.
Is there a way to set up Netlify that would allow for easy versioning, creating branch deployments for each older major version and possibly routing them through /versions/vx.y.z
, possibly also with /versions/vx
redirecting to the latest semver release under that major version?
I am aware that some local scripting would be needed, for example to get the released versions out of git tags, or through branch names with special naming conventions in order to generate links to the old versions and possibly also to generate netlify config files.
I would love to see an example implementation of this