Skip to content

Commit 0a01bae

Browse files
Fix epub-related failures (godotengine#8207)
* Append closing "/" to meta description tag; do not add new description tag if one already exists * Add closing "/" to all meta tags * Remove URL parameters from css/js paths to fix ThemeError * Updating package versions to reflect the latest versions in the readthedocs github repo * noop change to trigger CI workflow * Add verbose option to "pip3 install" * Update python version to 3.9 * Debug Iteration * Revert CI testing changes * Revert module upgrades and changes it required * Update _extensions/godot_descriptions.py --------- Co-authored-by: Max Hilbrunner <[email protected]>
1 parent a88dbc4 commit 0a01bae

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

_extensions/godot_descriptions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,11 @@ def generate_description(app, pagename, templatename, context, doctree):
103103
doctree.walkabout(generator)
104104

105105
description = (
106-
'<meta name="description" content="' + generator.create_description() + '">\n'
106+
'<meta name="description" content="' + generator.create_description() + '" />\n'
107107
)
108108

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

111112

112113
def setup(app):

_templates/layout.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
{% endblock -%}
77

88
{% block extrahead -%}
9-
<meta name="doc_version" content="{{ version }}">
10-
<meta name="doc_is_latest" content="{{ godot_is_latest }}">
9+
<meta name="doc_version" content="{{ version }}" />
10+
<meta name="doc_is_latest" content="{{ godot_is_latest }}" />
1111
{% endblock -%}
1212

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

6868
{% block body %}{% endblock %}
69-
</div>
7069
{%- if self.comments()|trim %}
7170
<div class="articleComments">
7271
{%- block comments %}{% endblock %}

0 commit comments

Comments
 (0)