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 %}
|
{% if READTHEDOCS and current_version %}
|
||||||
{%- set nav_version = current_version %}
|
{%- set nav_version = current_version %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if nav_version %}
|
||||||
|
<div class="lammps_version">Version: <b>{{ nav_version }}</b></div>
|
||||||
|
<div class="lammps_release">git info: {{ release }}</div>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include "searchbox.html" %}
|
{% include "searchbox.html" %}
|
||||||
|
|||||||
@ -408,11 +408,13 @@ try:
|
|||||||
except NameError:
|
except NameError:
|
||||||
html_context = dict()
|
html_context = dict()
|
||||||
|
|
||||||
html_context['display_manual_versions'] = True
|
is_website_build = os.environ.get('LAMMPS_WEBSITE_BUILD', '0') != '0'
|
||||||
html_context['current_version'] = version
|
|
||||||
|
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['git_commit'] = git_commit
|
||||||
html_context['versions'] = [
|
html_context['versions'] = [
|
||||||
('latest', 'https://docs.lammps.org/'),
|
('latest', 'https://docs.lammps.org/latest/'),
|
||||||
('8 Apr 2021', 'https://lammps.sandia.gov/doc/')
|
(version, 'https://docs.lammps.org/')
|
||||||
]
|
]
|
||||||
html_context['downloads'] = [('PDF', 'Manual.pdf')]
|
html_context['downloads'] = [('PDF', 'Manual.pdf')]
|
||||||
|
|||||||
Reference in New Issue
Block a user