Skip to content
Merged
5 changes: 3 additions & 2 deletions _extensions/godot_descriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ def generate_description(app, pagename, templatename, context, doctree):
doctree.walkabout(generator)

description = (
'<meta name="description" content="' + generator.create_description() + '">\n'
'<meta name="description" content="' + generator.create_description() + '" />\n'
)

context["metatags"] += description
if not '<meta name="description"' in context["metatags"]:
context["metatags"] += description


def setup(app):
Expand Down
7 changes: 3 additions & 4 deletions _templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
{% endblock -%}

{% block extrahead -%}
<meta name="doc_version" content="{{ version }}">
<meta name="doc_is_latest" content="{{ godot_is_latest }}">
<meta name="doc_version" content="{{ version }}" />
<meta name="doc_is_latest" content="{{ godot_is_latest }}" />
{% endblock -%}

{% block linktags -%}
<meta name="theme-color" content="#3d8fcc">
<meta name="theme-color" content="#3d8fcc" />
{% if godot_inject_language_links -%}
{% for alternate_lang in godot_docs_supported_languages -%}
{# Convert to ISO 639-1 format, e.g. zh_CN -> zh-cn -#}
Expand Down Expand Up @@ -66,7 +66,6 @@
{% endif %}

{% block body %}{% endblock %}
</div>
{%- if self.comments()|trim %}
<div class="articleComments">
{%- block comments %}{% endblock %}
Expand Down