Add LAMMPS_WEBSITE_BASEURL env variable to set canonical URL in docs

This commit is contained in:
Richard Berger
2021-06-02 17:44:45 -04:00
parent 6f00e98945
commit 1e66dfbd74
3 changed files with 7 additions and 5 deletions

View File

@ -38,10 +38,11 @@
{% if favicon %}
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
{% endif %}
{# CANONICAL URL #}
{% if theme_canonical_url %}
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
{% endif %}
{#- CANONICAL URL #}
{%- if pageurl %}
<link rel="canonical" href="{{ pageurl|e }}" />
{%- endif -%}
{# JAVASCRIPTS #}
{%- block scripts %}

View File

@ -4,7 +4,6 @@ stylesheet = css/theme.css
pygments_style = default
[options]
canonical_url =
analytics_id =
collapse_navigation = False
sticky_navigation = False

View File

@ -255,6 +255,8 @@ htmlhelp_basename = 'LAMMPSdoc'
html_permalinks = True
html_baseurl = os.environ.get('LAMMPS_WEBSITE_BASEURL', '')
if 'epub' in sys.argv:
html_math_renderer = 'imgmath'
else: