Ajout d'un avertissement quand on consulte une ancienne version ou une version de travail
This commit is contained in:
parent
c5a2a6e495
commit
b6c761eaa9
2 changed files with 21 additions and 2 deletions
18
source/_templates/page.html
Normal file
18
source/_templates/page.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{% extends "!page.html" %}
|
||||
{% block body %}
|
||||
{% if current_version and latest_version and current_version != latest_version %}
|
||||
<div class="warning admonition">
|
||||
<p class="admonition-title">Attention</p>
|
||||
<p>
|
||||
{% if current_version.is_released %}
|
||||
Ceci est une ancienne version de la documentation.
|
||||
La dernière version est la <a href="{{ vpathto(latest_version.name) }}">{{latest_version.name}}</a>.
|
||||
{% else %}
|
||||
Ceci est une version en cours de développement.
|
||||
La dernière version stable est la <a href="{{ vpathto(latest_version.name) }}">{{latest_version.name}}</a>.
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ super() }}
|
||||
{% endblock %}
|
||||
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue