diff --git a/source/_templates/page.html b/source/_templates/page.html new file mode 100644 index 0000000..5ab4d45 --- /dev/null +++ b/source/_templates/page.html @@ -0,0 +1,18 @@ +{% extends "!page.html" %} +{% block body %} +{% if current_version and latest_version and current_version != latest_version %} +
+

Attention

+

+ {% if current_version.is_released %} + Ceci est une ancienne version de la documentation. + La dernière version est la {{latest_version.name}}. + {% else %} + Ceci est une version en cours de développement. + La dernière version stable est la {{latest_version.name}}. + {% endif %} +

+
+{% endif %} +{{ super() }} +{% endblock %} diff --git a/source/conf.py b/source/conf.py index 82f72ec..b33db6e 100644 --- a/source/conf.py +++ b/source/conf.py @@ -67,5 +67,6 @@ html_theme_options = { # sphinx-multiversion settings smv_branch_whitelist = r'^main$' -smv_tag_whitelist = r'^v[0-9\.]+$' -smv_released_pattern = r'^tags/.*$' +smv_tag_whitelist = r'^v[\d\.]+$' +smv_released_pattern = r'.*tags/v[\d\.]+' +smv_latest_version = 'v1.0.0'