]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-130521: Add Open Graph meta tags to template pages (GH-130523) (#132238)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 7 Apr 2025 21:06:29 +0000 (23:06 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Apr 2025 21:06:29 +0000 (21:06 +0000)
gh-130521: Add Open Graph meta tags to template pages (GH-130523)
(cherry picked from commit f5639d87f59043d3075dbd3d9075f30e872dd91a)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Doc/tools/templates/download.html
Doc/tools/templates/indexcontent.html
Doc/tools/templates/search.html

index 45ec436fee72d794e236adb193e359b5f6661432..4645f7d394e29e6d4e8482454197e170aa6bb1a5 100644 (file)
   {% set dl_version = release %}
 {% endif %}
 
+{%- block extrahead -%}
+    {{ super() }}
+    <meta property="og:title" content="Download — Python {{ dl_version }} documentation">
+    <meta property="og:type" content="website">
+    <meta property="og:url" content="https://docs.python.org/3/download.html">
+    <meta property="og:site_name" content="Python documentation">
+    <meta property="og:description" content="Download Python documentation.">
+    <meta property="og:image" content="https://docs.python.org/3/_static/og-image.png">
+    <meta name="description" content="Download Python documentation.">
+    <meta property="og:image:width" content="200">
+    <meta property="og:image:height" content="200">
+    <meta name="theme-color" content="#3776ab">
+{%- endblock -%}
+
 {% block body %}
 <h1>{% trans %}Download Python {{ dl_version }} Documentation{% endtrans %}</h1>
 
index 0d25dd45e9a0c724b95ba7bfbfa104e1ca360400..06a4223643a05a3142bb176deae90871e3080777 100644 (file)
@@ -2,6 +2,19 @@
 {%- block htmltitle -%}
 <title>{{ shorttitle }}</title>
 {%- endblock -%}
+{%- block extrahead -%}
+    {{ super() }}
+    <meta property="og:title" content="Python {{ version }} documentation">
+    <meta property="og:type" content="website">
+    <meta property="og:url" content="https://docs.python.org/3/">
+    <meta property="og:site_name" content="Python documentation">
+    <meta property="og:description" content="The official Python documentation.">
+    <meta property="og:image" content="https://docs.python.org/3/_static/og-image.png">
+    <meta name="description" content="The official Python documentation.">
+    <meta property="og:image:width" content="200">
+    <meta property="og:image:height" content="200">
+    <meta name="theme-color" content="#3776ab">
+{%- endblock -%}
 {% block body %}
   <h1>{{ docstitle|e }}</h1>
   <p>
index 6ddac5f828bab1440f6e7310e3252a73263aef67..8ff7622389bc6626ce13d6aba98d21f2b1feaee5 100644 (file)
@@ -3,6 +3,16 @@
     {{ super() }}
     <meta name="robots" content="noindex">
     <script type="text/javascript" src="{{ pathto('_static/glossary_search.js', resource=True) }}"></script>
+    <meta property="og:title" content="Search — Python {{ version }} documentation">
+    <meta property="og:type" content="website">
+    <meta property="og:url" content="https://docs.python.org/3/search.html">
+    <meta property="og:site_name" content="Python documentation">
+    <meta property="og:description" content="Search the Python documentation.">
+    <meta property="og:image" content="https://docs.python.org/3/_static/og-image.png">
+    <meta name="description" content="Search the Python documentation.">
+    <meta property="og:image:width" content="200">
+    <meta property="og:image:height" content="200">
+    <meta name="theme-color" content="#3776ab">
 {% endblock %}
 {% block searchresults %}
 <div id="search-results">