Document versioning in monorepo

Viewed 91

Background: I have one repo with multiple subdirectories. e.g

Myrepo:
 Foo
  Readme.md
  Changelog.md
 Bar
  Readme.md
  Changelog.md

Each of the subdirectory has its own version tag in Github. e.g Foo v1.0.0 Bar v2.0.0

I'm currently exploring an individual versioning documentation for each subdirectory I've started looking into using Mkdocs and hosts the document in Github Pages. While I could use mike for versioning and monorepo plugin to merge all the documents in one place, this option can only create one global document version for the repo rather than individual document version for each subdirectory. So I would have something like this in Github Page

MyRepo Document V1
 Foo
 Bar

MyRepo Document V2
 Foo
 Bar

Instead of

MyRepo Document V1, V2
 Foo V1, V2
 Bar V1, V2

I'm just wondering if anyone has run into this issue and what would be the best option for individual document versioning in a monorepo scenario. Or whether this is not possible?

Thank you

1 Answers

Ideally, version number does not appear in file or folder names: that would defeat the all "versioning" aspect.

You would be using:

  • a branch V1 or V2, in which you can have versions of your documents towards V1 or V2
  • a tag V1 or V2 to mark the final state of V1 or V2.

That way, since the documents keep the same path and filename, you can merge between branches or make diffs easily.

Related