8000 Add support for Semantic Versioning to the Version Warning · Issue #4919 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

Skip to content

Add support for Semantic Versioning to the Version Warning  #4919

@SaltyAimbOtter

Description

@SaltyAimbOtter

Contribution guidelines

I want to suggest an idea and checked that ...

  • ... to my best knowledge, my idea wouldn't break something for other users
  • ... the documentation does not mention anything about my idea
  • ... there are no open or closed issues that are related to my idea

Description

The version warning should be able to correctly inform the user about outdated versions if the semantic versioning version format is used.

The current behaviour is like this:
Green = Correctly shows no warning (latest)
Red = Shows no warning although it should
Light Green = Correctly shows a warning
grafik

Mike does claim that it is made for two digit version only. However, it also claims that it is "flexible". In our project, we never had any problems using semantic versioning with mike. I'm sure it's a common use case considering that semantic versioning is quite popular.

In addition to that a dedicated banner for development versions would be useful:
We have one RELEASE (1.2.3) doc version and one DEV doc version (e.g. 2.0.0-DEV). Additionally there are many old docs versions (e.g. 1.2.2, 1.2.1 etc.).
We would like to show one variant of the warning banner in the docs of legacy versions and another in the development docs.
This could be attached to aliases:

Mike Alias Banner
latest No Banner
development Banner Variant 1
none Banner Variant 2

Where Banner Variant 1 would say something like: You are viewing the docs for the development version! Be careful or use the latest release!
And Banner Variant 2 would say something like: You are viewing outdated docs and will recieve no support! Update to the latest release!

The amount of version qualifiers might differ between projects though. So this should be customizable. I'm not sure if and how this could be implemented considering the current implementation works with theme overrides.

Use Cases

Many users probably release one documentation version together with a software release. Since semantic versioning is very popular this should affect a large part of the user base.

Screenshots / Mockups

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    change requestIssue requests a new feature or improvementresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0