浏览代码

Remove canonical/hreflang tags, let RTD I18N do it

Max Hilbrunner 8 月之前
父节点
当前提交
097c7ecbcc
共有 2 个文件被更改,包括 0 次插入14 次删除
  1. 0 10
      _templates/layout.html
  2. 0 4
      conf.py

+ 0 - 10
_templates/layout.html

@@ -13,16 +13,6 @@
 
 
 {% block linktags -%}
 {% 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 -#}
-  {% 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() }}
   {{ super() }}
 {% endblock -%}
 {% endblock -%}
 
 

+ 0 - 4
conf.py

@@ -181,13 +181,9 @@ html_context = {
     "github_repo": "godot-docs",  # Repo name
     "github_repo": "godot-docs",  # Repo name
     "github_version": "4.3",  # Version
     "github_version": "4.3",  # Version
     "conf_py_path": "/",  # Path in the checkout to the docs root
     "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_title": supported_languages[language],
     "godot_docs_basepath": "https://docs.godotengine.org/",
     "godot_docs_basepath": "https://docs.godotengine.org/",
     "godot_docs_suffix": ".html",
     "godot_docs_suffix": ".html",
-    "godot_default_lang": "en",
-    "godot_canonical_version": "stable",
     # Distinguish local development website from production website.
     # Distinguish local development website from production website.
     # This prevents people from looking for changes on the production website after making local changes :)
     # This prevents people from looking for changes on the production website after making local changes :)
     "godot_title_prefix": "" if on_rtd else "(DEV) ",
     "godot_title_prefix": "" if on_rtd else "(DEV) ",