{# Add rst-badge after rst-versions for small badge style. #} {% set display_version = version -%} {% set listed_languages = ({"en":"en", "zh_CN":"zh_CN"}).items() -%} {% set listed_versions = ({"stable":"stable", "latest":"latest"}).items() -%}
{% if READTHEDOCS and current_version %} {% set display_version = current_version -%} {% endif %} {% if READTHEDOCS and versions %} {% set listed_versions = versions -%} {% endif %}
<divclass="rst-versions"data-toggle="rst-versions"role="note"aria-label="versions"> <spanclass="rst-current-version"data-toggle="rst-current-version"> <spanclass="fa fa-book"> Read the Docs</span> v: {{ display_version }}{% if display_version != godot_version %} ({{ godot_version }}){% endif %} <spanclass="fa fa-caret-down"></span> </span> <divclass="rst-other-versions"> {# The contents of this element will be replaced in production. But we can still have some mock data for testing. #}
html_context = { "display_github": not is_i18n, # Integrate GitHub "github_user": "godotengine", # Username "github_repo": "godot-docs", # Repo name "github_version": "master", # Version "conf_py_path": "/", # Path in the checkout to the docs root "godot_docs_title": supported_languages[language], "godot_docs_basepath": "https://docs.godotengine.org/", "godot_docs_suffix": ".html", # 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) ", # Set this to `True` when in the `latest` branch to clearly indicate to the reader # that they are not reading the `stable` documentation. "godot_is_latest": True, "godot_version": "4.5", # Enables a banner that displays the up-to-date status of each article. "godot_show_article_status": True, # Display user-contributed notes at the bottom of pages that don't have `:allow_comments: False` at the top. "godot_show_article_comments": on_rtd andnot is_i18n, "current_language": language, }