Keep version in header, only show selector if LAMMPS_WEBSITE_BUILD is set

This commit is contained in:
Richard Berger
2021-05-25 17:15:17 -04:00
parent cf18ec6cc6
commit a3a2bdc8f6
2 changed files with 10 additions and 4 deletions

View File

@ -138,6 +138,10 @@
{% if READTHEDOCS and current_version %}
{%- set nav_version = current_version %}
{% endif %}
{% if nav_version %}
<div class="lammps_version">Version: <b>{{ nav_version }}</b></div>
<div class="lammps_release">git info: {{ release }}</div>
{% endif %}
{% endif %}
{% include "searchbox.html" %}

View File

@ -408,11 +408,13 @@ try:
except NameError:
html_context = dict()
html_context['display_manual_versions'] = True
html_context['current_version'] = version
is_website_build = os.environ.get('LAMMPS_WEBSITE_BUILD', '0') != '0'
html_context['display_manual_versions'] = is_website_build
html_context['current_version'] = os.environ.get('LAMMPS_WEBSITE_BUILD', version)
html_context['git_commit'] = git_commit
html_context['versions'] = [
('latest', 'https://docs.lammps.org/'),
('8 Apr 2021', 'https://lammps.sandia.gov/doc/')
('latest', 'https://docs.lammps.org/latest/'),
(version, 'https://docs.lammps.org/')
]
html_context['downloads'] = [('PDF', 'Manual.pdf')]