Keep version in header, only show selector if LAMMPS_WEBSITE_BUILD is set
This commit is contained in:
@ -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" %}
|
||||
|
||||
@ -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')]
|
||||
|
||||
Reference in New Issue
Block a user