Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf5639d8

Browse files
StanFromIrelandAA-Turnerhugovk
authored
gh-130521: Add Open Graph meta tags to template pages (#130523)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parentc0de650 commitf5639d8

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

‎Doc/tools/templates/download.html

Lines changed: 14 additions & 0 deletions
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+
<metaproperty="og:title"content="Download — Python {{ dl_version }} documentation">
18+
<metaproperty="og:type"content="website">
19+
<metaproperty="og:url"content="https://docs.python.org/3/download.html">
20+
<metaproperty="og:site_name"content="Python documentation">
21+
<metaproperty="og:description"content="Download Python documentation.">
22+
<metaproperty="og:image"content="https://docs.python.org/3/_static/og-image.png">
23+
<metaname="description"content="Download Python documentation.">
24+
<metaproperty="og:image:width"content="200">
25+
<metaproperty="og:image:height"content="200">
26+
<metaname="theme-color"content="#3776ab">
27+
{%- endblock -%}
28+
1529
{% block body %}
1630
<h1>{% trans %}Download Python {{ dl_version }} Documentation{% endtrans %}</h1>
1731

‎Doc/tools/templates/indexcontent.html

Lines changed: 13 additions & 0 deletions
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+
<metaproperty="og:title"content="Python {{ version }} documentation">
8+
<metaproperty="og:type"content="website">
9+
<metaproperty="og:url"content="https://docs.python.org/3/">
10+
<metaproperty="og:site_name"content="Python documentation">
11+
<metaproperty="og:description"content="The official Python documentation.">
12+
<metaproperty="og:image"content="https://docs.python.org/3/_static/og-image.png">
13+
<metaname="description"content="The official Python documentation.">
14+
<metaproperty="og:image:width"content="200">
15+
<metaproperty="og:image:height"content="200">
16+
<metaname="theme-color"content="#3776ab">
17+
{%- endblock -%}
518
{% block body %}
619
<h1>{{ docstitle|e }}</h1>
720
<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
<metaname="robots"content="noindex">
55
<scripttype="text/javascript"src="{{ pathto('_static/glossary_search.js', resource=True) }}"></script>
6+
<metaproperty="og:title"content="Search — Python {{ version }} documentation">
7+
<metaproperty="og:type"content="website">
8+
<metaproperty="og:url"content="https://docs.python.org/3/search.html">
9+
<metaproperty="og:site_name"content="Python documentation">
10+
<metaproperty="og:description"content="Search the Python documentation.">
11+
<metaproperty="og:image"content="https://docs.python.org/3/_static/og-image.png">
12+
<metaname="description"content="Search the Python documentation.">
13+
<metaproperty="og:image:width"content="200">
14+
<metaproperty="og:image:height"content="200">
15+
<metaname="theme-color"content="#3776ab">
616
{% endblock %}
717
{% block searchresults %}
818
<divid="search-results">

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp