jimporter / mike

Manage multiple versions of your MkDocs-powered documentation via Git
BSD 3-Clause "New" or "Revised" License
511 stars 45 forks source link

[FEATURE] A smart version selector #173

Closed frank-lenormand closed 10 months ago

frank-lenormand commented 10 months ago

Hi,

From what I could see, all versions of the documentation ever published are included in the selector.

I would like the selector to be able to show versions that should be most relevant.

For example, assuming the versioning scheme is major.minor, it could show:

This feature could be opt-in, via a configuration option, or it could be implemented as part of the selector wheel (a tab? a checkbox? …).

Examples:

5.0
--
4.0
5.1
5.0
--
4.0
5.9
5.8
5.7
--
4.0
0.3
0.2
0.1
0.1

Thanks!

jimporter commented 10 months ago

I think this is really a matter best left to themes, or individual project authors. You can always adjust the exact behavior of the version selector by copying the existing JS/CSS for it and modifying the code to your liking.

It'll probably get easier to do something like that though when #138 is implemented. That would require adding extra properties to each version, but then your version selector code could consult that and do something about it.