k8gb icon indicating copy to clipboard operation
k8gb copied to clipboard

Add versioning to k8gb.io documentation

Open somaritane opened this issue 3 years ago • 6 comments

As our releasing cadence increases, and we bring more breaking changes, it might be useful to have a versioning system for our documentation.

This might help us to keep track of what's new in each release, especially when it comes to k8gb configuration values.

P.S. This might require changing of Jekyll theme to something that supports versioning, or changing to some other static web-page authoring framework, which has that versioning support built-in, like Hugo

Assignees: Labels: documentation

somaritane avatar Dec 09 '21 13:12 somaritane

there is a docsy hugo template used by a lot of cncf projects: https://www.docsy.dev/docs/examples/ and also by k8s itself

jkremser avatar Apr 06 '22 12:04 jkremser

Cool, need to check how it supports versioning

somaritane avatar Apr 06 '22 12:04 somaritane

I think the version support is not there in the template or hugo itself.. well it can be done using the directories, like:

  • content/en/docs/v0.0.1/something.md
  • content/en/docs/v0.0.2/something.md

But this is not a good approach, imho. What I've seen is this:

  1. have the main template for the landing page in 1 branch (be it gh-pages or anything else)
  2. have the version specific docs stored in a separate branch using some template, like v0.x-docs (often this scheme corresponds with the strategy when breaking changes are introduced -> need for another parallel docs)
  3. use the netlify feature for this: https://docs.netlify.com/domains-https/custom-domains/multiple-domains/#branch-subdomains together with auto builds
  4. link those versioned docs from the landing page from some combo box

examples using this approach are:

  • https://www.kubeflow.org/
  • https://docs.k8ssandra.io/
  • https://kubernetes.io/ (check the links when switching the versions)

jkremser avatar Apr 06 '22 14:04 jkremser

Found this in docsy's documentation: https://www.docsy.dev/docs/adding-content/versioning/

somaritane avatar Apr 06 '22 14:04 somaritane

ah cool, yes, that looks like 4) from my description. So the combo box (/dropdown) is a built-in feature in the template, but they are not opinionated about the deployment of those versions

jkremser avatar Apr 06 '22 14:04 jkremser

yep, so we can use branch subdomains for publishing and then refer to these subdomains

somaritane avatar Apr 06 '22 16:04 somaritane