Skip to content

Commit 061a8f2

Browse files
Add html meta tags
1 parent 25a7ddf commit 061a8f2

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

Doc/tools/templates/download.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
1212
{% set dl_version = release %}
1313
{% endif %}
1414

15+
{%- block extrahead -%}
16+
<meta property="og:title" content="Download — Python {{ version }} documentation" />
17+
<meta property="og:type" content="website" />
18+
<meta property="og:url" content="https://docs.python.org/{{ version }}/download.html" />
19+
<meta property="og:site_name" content="Python documentation" />
20+
<meta property="og:description" content="Download the Python Documentation." />
21+
<meta property="og:image" content="https://docs.python.org/3/_static/og-image.png" />
22+
<meta property="og:image:alt" content="Python documentation" />
23+
<meta name="description" content="Download the Python Documentation." />
24+
<meta property="og:image:width" content="200" />
25+
<meta property="og:image:height" content="200" />
26+
{%- endblock -%}
27+
1528
{% block body %}
1629
<h1>{% trans %}Download Python {{ dl_version }} Documentation{% endtrans %}</h1>
1730

Doc/tools/templates/indexcontent.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
{%- block htmltitle -%}
33
<title>{{ shorttitle }}</title>
44
{%- endblock -%}
5+
{%- block extrahead -%}
6+
<meta property="og:title" content="{{ version }} documentation" />
7+
<meta property="og:type" content="website" />
8+
<meta property="og:url" content="https://docs.python.org/{{ version }}/index.html" />
9+
<meta property="og:site_name" content="Python documentation" />
10+
<meta property="og:description" content="The official Python Documentation." />
11+
<meta property="og:image" content="https://docs.python.org/3/_static/og-image.png" />
12+
<meta property="og:image:alt" content="Python documentation" />
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+
{%- endblock -%}
517
{% block body %}
618
<h1>{{ docstitle|e }}</h1>
719
<p>

Doc/tools/templates/search.html

Lines changed: 10 additions & 0 deletions
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/{{ version }}/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 property="og:image:alt" content="Python documentation" />
13+
<meta name="description" content="Search the Python Documentation." />
14+
<meta property="og:image:width" content="200" />
15+
<meta property="og:image:height" content="200" />
616
{% endblock %}
717
{% block searchresults %}
818
<div id="search-results">

0 commit comments

Comments
 (0)