Skip to content

Commit

Permalink
Prepend "(DEV)" to HTML titles if build locally/not on RTD
Browse files Browse the repository at this point in the history
  • Loading branch information
mhilbrunner committed Apr 28, 2020
1 parent 3c79f3e commit 0b6d26e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions _templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@
{% endif -%}
{{ super() }}
{% endblock -%}

{% block htmltitle -%}
<title>{{ godot_title_prefix }}{{ title|striptags|e }}{{ titlesuffix }}</title>
{% endblock -%}
3 changes: 3 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
"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"
Expand Down

0 comments on commit 0b6d26e

Please sign in to comment.