2

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

ChrisJ
  • 21
  • 2

1 Answers1

0

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank you for you response! In my case, each subdirectory is an individual service, And it already has its own tag. All I wanted to do is to keep the historical documents like readme.md and changelog.md so that the users can still search for e.g. version 1 in the document portal like github page. I may have mis presented in the question but Foo V1, V2 here essentially represents the option in Github page to display the document version as opposed to the folder version in Git itself. Currently, I could only present this option for the entire repo. – ChrisJ Jun 19 '22 at 13:14
  • @ChrisJ its own tag? What do you mean by tag? the V1 in its folder name? – VonC Jun 19 '22 at 13:48
  • It's the github tag system, for example this kind of tag https://github.com/jimporter/mike/tags. In my case, I would have something like Foo/v1.0.0 as individual versioning of subfolder in my repo. so I'm trying to do individual versioning for the documents and keep the historical documents in github page. – ChrisJ Jun 20 '22 at 17:18