Skip to content

Commit b68ab1e

Browse files
committed
[hotfix][docs] Strip leading slash in redirect template before relURL
1 parent b81b124 commit b68ab1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/layouts/_default/redirect.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
<html lang="{{ .Site.Language.Lang }}">
2121
<head>
2222
<meta charset="UTF-8">
23-
<meta http-equiv="refresh" content="0; url={{ .Params.redirect_to | relURL }}">
24-
<link rel="canonical" href="{{ .Params.redirect_to | relURL }}">
23+
<meta http-equiv="refresh" content="0; url={{ strings.TrimPrefix "/" .Params.redirect_to | relURL }}">
24+
<link rel="canonical" href="{{ strings.TrimPrefix "/" .Params.redirect_to | relURL }}">
2525
<title>Redirecting...</title>
2626
</head>
2727
<body>
28-
<p>This page has moved. If you are not redirected automatically, <a href="{{ .Params.redirect_to | relURL }}">click here</a>.</p>
28+
<p>This page has moved. If you are not redirected automatically, <a href="{{ strings.TrimPrefix "/" .Params.redirect_to | relURL }}">click here</a>.</p>
2929
</body>
3030
</html>

0 commit comments

Comments
 (0)