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

Update doc version warning logic to exclude specific pages #4180

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions source/_templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,26 @@
{% endblock %}
{% block body %}
{% if current_version and latest_version and current_version != latest_version %}
<p>
<strong>
{% if current_version.name|string() in eol_versions %}
You're reading the documentation for a version of ROS 2 that has reached its EOL (end-of-life), and is no longer officially supported.
If you want up-to-date information, please have a look at <a href="{{ vpathto(latest_version.name) }}">{{latest_version.name | title }}</a>.
{% elif current_version.is_released %}
You're reading the documentation for an older, but still supported, version of ROS 2.
For information on the latest version, please have a look at <a href="{{ vpathto(latest_version.name) }}">{{latest_version.name | title }}</a>.
{% else %}
You're reading the documentation for a development version.
For the latest released version, please have a look at <a href="{{ vpathto(latest_version.name) }}">{{latest_version.name | title }}</a>.
{% endif %}
</strong>
</p>
{% set skip_message = False %}
{% if pagename == 'Contributing/Contributing-To-ROS-2-Documentation' or 'Releases/' in pagename %}
Victor-Boyd marked this conversation as resolved.
Show resolved Hide resolved
{% set skip_message = True %}
{% endif %}
{% if not skip_message %}
<p>
<strong>
{% if current_version.name|string() in eol_versions %}
You're reading the documentation for a version of ROS 2 that has reached its EOL (end-of-life), and is no longer officially supported.
If you want up-to-date information, please have a look at <a href="{{ vpathto(latest_version.name) }}">{{latest_version.name | title }}</a>.
{% elif current_version.is_released %}
You're reading the documentation for an older, but still supported, version of ROS 2.
For information on the latest version, please have a look at <a href="{{ vpathto(latest_version.name) }}">{{latest_version.name | title }}</a>.
{% else %}
You're reading the documentation for a development version.
For the latest released version, please have a look at <a href="{{ vpathto(latest_version.name) }}">{{latest_version.name | title }}</a>.
{% endif %}
</strong>
</p>
{% endif %}
{% endif %}
{{ super() }}
{% endblock %}%
Loading