PRS: Add CNAME generation and `rel="canonical"`

This commit is contained in:
Adam Turner 2022-03-09 19:00:12 +00:00
parent 49e262f220
commit 563de32559
2 changed files with 2 additions and 0 deletions

View File

@ -56,6 +56,7 @@ html_theme = "pep_theme" # The actual theme directory (child of html_theme_path
html_use_index = False # Disable index (we use PEP 0)
html_style = "" # must be defined here or in theme.conf, but is unused
html_permalinks = False # handled in the PEPContents transform
html_baseurl = "https://peps.python.org" # to create the CNAME file
gettext_auto_build = False # speed-ups
templates_path = ['pep_sphinx_extensions/pep_theme/templates'] # Theme template relative paths from `confdir`

View File

@ -7,6 +7,7 @@
<meta name="color-scheme" content="light dark" />
<title>{{ title + " | peps.python.org"|safe }}</title>
<link rel="shortcut icon" href="{{ pathto('_static/py.png', resource=True) }}"/>
<link rel="canonical" href="{{ pageurl|escape }}" />
<link rel="stylesheet" href="{{ pathto('_static/style.css', resource=True) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/mq.css', resource=True) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/dark.css', resource=True) }}" type="text/css" media="(prefers-color-scheme: dark)" id="css-dark"/>