Skip to content

Commit

Permalink
Merge pull request #10209 from mhilbrunner/i18n-fix
Browse files Browse the repository at this point in the history
I18N: Remove canonical/hreflang tags, let RTD handle SEO/locale negotiation
  • Loading branch information
mhilbrunner authored Nov 7, 2024
2 parents 3aa11b7 + 181206b commit a178d0c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
10 changes: 0 additions & 10 deletions _templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@

{% block linktags -%}
<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 -#}
{% set alternate_lang_href = alternate_lang.lower().replace("_", "-") -%}
<link rel="alternate" hreflang="{{ alternate_lang_href }}" href="{{ godot_docs_basepath }}{{ alternate_lang }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />
{% endfor -%}
<link rel="alternate" hreflang="x-default" href="{{ godot_docs_basepath }}{{ godot_default_lang }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />

<link rel="canonical" href="{{ godot_docs_basepath }}{{ lang_attr }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />
{% endif -%}
{{ super() }}
{% endblock -%}

Expand Down
4 changes: 0 additions & 4 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,9 @@
"github_repo": "godot-docs", # Repo name
"github_version": "master", # Version
"conf_py_path": "/", # Path in the checkout to the docs root
"godot_inject_language_links": True,
"godot_docs_supported_languages": list(supported_languages.keys()),
"godot_docs_title": supported_languages[language],
"godot_docs_basepath": "https://docs.godotengine.org/",
"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) ",
Expand Down

0 comments on commit a178d0c

Please sign in to comment.