Skip to content

Commit f5639d8

Browse files
StanFromIrelandAA-Turnerhugovk
authored
gh-130521: Add Open Graph meta tags to template pages (#130523)
Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent c0de650 commit f5639d8

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

Diff for: Doc/tools/templates/download.html

+14
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@
1212
{% set dl_version = release %}
1313
{% endif %}
1414

15+
{%- block extrahead -%}
16+
{{ super() }}
17+
<meta property="og:title" content="Download — Python {{ dl_version }} documentation">
18+
<meta property="og:type" content="website">
19+
<meta property="og:url" content="https://docs.python.org/3/download.html">
20+
<meta property="og:site_name" content="Python documentation">
21+
<meta property="og:description" content="Download Python documentation.">
22+
<meta property="og:image" content="https://docs.python.org/3/_static/og-image.png">
23+
<meta name="description" content="Download Python documentation.">
24+
<meta property="og:image:width" content="200">
25+
<meta property="og:image:height" content="200">
26+
<meta name="theme-color" content="#3776ab">
27+
{%- endblock -%}
28+
1529
{% block body %}
1630
<h1>{% trans %}Download Python {{ dl_version }} Documentation{% endtrans %}</h1>
1731

Diff for: Doc/tools/templates/indexcontent.html

+13
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22
{%- block htmltitle -%}
33
<title>{{ shorttitle }}</title>
44
{%- endblock -%}
5+
{%- block extrahead -%}
6+
{{ super() }}
7+
<meta property="og:title" content="Python {{ version }} documentation">
8+
<meta property="og:type" content="website">
9+
<meta property="og:url" content="https://docs.python.org/3/">
10+
<meta property="og:site_name" content="Python documentation">
11+
<meta property="og:description" content="The official Python documentation.">
12+
<meta property="og:image" content="https://docs.python.org/3/_static/og-image.png">
13+
<meta name="description" content="The official Python documentation.">
14+
<meta property="og:image:width" content="200">
15+
<meta property="og:image:height" content="200">
16+
<meta name="theme-color" content="#3776ab">
17+
{%- endblock -%}
518
{% block body %}
619
<h1>{{ docstitle|e }}</h1>
720
<p>

Diff for: Doc/tools/templates/search.html

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
{{ super() }}
44
<meta name="robots" content="noindex">
55
<script type="text/javascript" src="{{ pathto('_static/glossary_search.js', resource=True) }}"></script>
6+
<meta property="og:title" content="Search — Python {{ version }} documentation">
7+
<meta property="og:type" content="website">
8+
<meta property="og:url" content="https://docs.python.org/3/search.html">
9+
<meta property="og:site_name" content="Python documentation">
10+
<meta property="og:description" content="Search the Python documentation.">
11+
<meta property="og:image" content="https://docs.python.org/3/_static/og-image.png">
12+
<meta name="description" content="Search the Python documentation.">
13+
<meta property="og:image:width" content="200">
14+
<meta property="og:image:height" content="200">
15+
<meta name="theme-color" content="#3776ab">
616
{% endblock %}
717
{% block searchresults %}
818
<div id="search-results">

0 commit comments

Comments
 (0)