Skip to content

Commit baa9106

Browse files
committed
PRS: Support redirects
1 parent d1b0a16 commit baa9106

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pep_sphinx_extensions/pep_theme/templates/not_found.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@
1212
<link rel="stylesheet" href="{{ pathto('_static/dark.css', resource=True) }}" type="text/css" media="(prefers-color-scheme: dark)" id="css-dark"/>
1313
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet">
1414
<meta name="description" content="Python Enhancement Proposals (PEPs)"/>
15-
</head>
16-
<body>
1715
<script>
18-
window.onload = () => {
19-
const prefixNum = window.location.pathname.slice(1).replace(/^(\d*)$/, "$1")
20-
if (!isNaN(+prefixNum)) window.location.pathname = "/pep-" + prefixNum.padStart(4, "0")
21-
}
16+
const prefixNum = window.location.pathname.slice(1).replace(/^(\d*)$/, "$1")
17+
if (!isNaN(+prefixNum)) window.location.pathname = "/pep-" + prefixNum.padStart(4, "0")
2218
</script>
19+
</head>
20+
<body>
2321
<section id="pep-page-section">
2422
<header>
2523
<h1>Python Enhancement Proposals</h1>

0 commit comments

Comments
 (0)