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

Add support for "hidden" versions to the built-in theme extensions #187

Closed jimporter closed 8 months ago

jimporter commented 8 months ago

It should be possible to add a hidden property (see #138) to mark a version as hidden from the selector. This would mean it doesn't show up, except when it's the currently-selected version.

jimporter commented 8 months ago

@squidfunk Just wanted to give you a heads-up about this feature, in case you wanted to support it in your Material theme.

The short version is that users can now set arbitrary per-version properties, and one of them is hidden. That lets a user hide a specific version from the version selector (e.g. if they want to keep some old docs online, but not show them in the dropdown). This commit shows the new JS for the built-in themes to handle this.

squidfunk commented 8 months ago

Thanks for the heads up, sounds like a good addition! I'm currently busy on other parts of the project, but it is certainly an easy PR that can be done by somebody else, since we only need to filter by hidden in renderVersionSelector.