Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Mike hidden version flag #6904

Closed
4 tasks done
lcollins opened this issue Mar 12, 2024 · 4 comments
Closed
4 tasks done

Add support for Mike hidden version flag #6904

lcollins opened this issue Mar 12, 2024 · 4 comments
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open

Comments

@lcollins
Copy link

lcollins commented Mar 12, 2024

Context

No response

Description

We have MkDocs using Material within our organisation. We have been using the Mike plugin to publish the versions using SemVer 0.20.0 etc but equally we also publish the HEAD of the release branch as dev-0.20.x. Currently both versions are visible in the version dropdown.

We want to hide the dev-0.20.x versions and hoping we can do so using a feature the Mike maintainer mentioned on a similar issue jimporter/mike#151 (comment)

Related links

Use Cases

We would like versions with the hidden property be excluded from the version selector

Here is an example of the version.json file

[
  {
    "version": "dev-0.20.x",
    "title": "dev-0.20.x",
    "aliases": [
      "0.20.x"
    ],
    "properties": {
      "hidden": true
    }
  },
  {
    "version": "dev-main",
    "title": "dev-main",
    "aliases": [
      "development-latest",
      "main"
    ],
    "properties": {
      "hidden": true
    }
  },
  {
    "version": "1.0.0",
    "title": "1.0.0",
    "aliases": [
      "latest"
    ]
  },
  {
    "version": "0.20.1",
    "title": "0.20.1",
    "aliases": []
  },
  {
    "version": "0.20.0",
    "title": "0.20.0",
    "aliases": []
  }
]

Visuals

No response

Before submitting

@squidfunk squidfunk added the change request Issue requests a new feature or improvement label Mar 13, 2024
@squidfunk
Copy link
Owner

Thanks for suggesting. Without diving into the details, I think it is reasonable and simple to support ☺️

@squidfunk
Copy link
Owner

Added in 2f1b2e9. If a version has the hidden property, it will not be rendered in the selector. Everything else should keep working as-is.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Mar 13, 2024
@lcollins
Copy link
Author

Wow that was fast, thank you for your support @squidfunk

@squidfunk
Copy link
Owner

Released as part of 9.5.14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants