Prepend "(DEV)" to HTML titles if build locally/not on RTD

This commit is contained in:
Max Hilbrunner
2020-04-27 20:00:25 +02:00
parent 3c79f3e321
commit 0b6d26e33d
2 changed files with 7 additions and 0 deletions

View File

@@ -12,3 +12,7 @@
{% endif -%}
{{ super() }}
{% endblock -%}
{% block htmltitle -%}
<title>{{ godot_title_prefix }}{{ title|striptags|e }}{{ titlesuffix }}</title>
{% endblock -%}

View File

@@ -126,6 +126,9 @@ html_context = {
"godot_docs_suffix": ".html",
"godot_default_lang": "en",
"godot_canonical_version": "stable",
# Distinguish local development website from production website.
# This prevents people from looking for changes on the production website after making local changes :)
"godot_title_prefix": "" if on_rtd else "(DEV) ",
}
html_logo = "img/docs_logo.png"