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

Document smv_latest_version better #101

Open
dlmiles opened this issue May 2, 2023 · 0 comments
Open

Document smv_latest_version better #101

dlmiles opened this issue May 2, 2023 · 0 comments
Labels
type:task An atomic feature / thing to be implemented

Comments

@dlmiles
Copy link

dlmiles commented May 2, 2023

While the plugin has provision for enumerating tags and versions, there isn't a mechanism to specify which version is to be consider the 'latest' version, for the purpose of using the example HTML template to provide a message/alert to an update.

https://github.com/Holzhaus/sphinx-multiversion/blob/master/sphinx_multiversion/sphinx.py#L199

    app.add_config_value("smv_latest_version", "master", "html")

This setting appears to exist and hardwired to a poor default.
In many project the latest is considered to be the most recent stable release. This usually isn't master, that maybe considered a development branch. You project policy may vary.

== Nice to have feature request:

So this seems like it could do with being more configurable, documented and maybe even allow a lamdba function, to be an attribute decorator to be able to produce custom map key/value from being given a copy of the --dump-metadata for itself.

This way we can create our own is_version_some_state and no rely.

The default policies that exist for is_released and is_development_version can be recreated into that framework as a set of default lambdas executed.

This way any kind of policy can be implemented and feature/documentation requests like this to manage hardcoded stuff won't be needed.

@BurningEnlightenment BurningEnlightenment added the type:task An atomic feature / thing to be implemented label Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:task An atomic feature / thing to be implemented
Projects
Status: Ready
Development

No branches or pull requests

2 participants