Skip to content

Commit 563de32

Browse files
committed
PRS: Add CNAME generation and rel="canonical"
1 parent 49e262f commit 563de32

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
html_use_index = False # Disable index (we use PEP 0)
5757
html_style = "" # must be defined here or in theme.conf, but is unused
5858
html_permalinks = False # handled in the PEPContents transform
59+
html_baseurl = "https://peps.python.org" # to create the CNAME file
5960
gettext_auto_build = False # speed-ups
6061

6162
templates_path = ['pep_sphinx_extensions/pep_theme/templates'] # Theme template relative paths from `confdir`

pep_sphinx_extensions/pep_theme/templates/page.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<meta name="color-scheme" content="light dark" />
88
<title>{{ title + " | peps.python.org"|safe }}</title>
99
<link rel="shortcut icon" href="{{ pathto('_static/py.png', resource=True) }}"/>
10+
<link rel="canonical" href="{{ pageurl|escape }}" />
1011
<link rel="stylesheet" href="{{ pathto('_static/style.css', resource=True) }}" type="text/css" />
1112
<link rel="stylesheet" href="{{ pathto('_static/mq.css', resource=True) }}" type="text/css" />
1213
<link rel="stylesheet" href="{{ pathto('_static/dark.css', resource=True) }}" type="text/css" media="(prefers-color-scheme: dark)" id="css-dark"/>

0 commit comments

Comments
 (0)