Skip to content

Commit

Permalink
redirect is now valid XHTML
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve0Greatness committed Feb 2, 2024
1 parent 6810d70 commit 623b730
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def main():

print("Building redirects")
for OldLocation, NewLocation in REDIRECTS.items():
RenderPage("redirect.html", OldLocation, False, redirect=NewLocation)
RenderPage("redirect.html", OldLocation, False, redirect=NewLocation, old=OldLocation)

with open(BUILD_DIRECTORY + "/sitemap.txt", "w") as SitemapFile:
SitemapFile.write("\n".join(sitemap))
Expand Down
30 changes: 23 additions & 7 deletions views/redirect.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
<link rel="canonical" href="{{redirect}}"/>
<meta charset="utf-8"/>
<script>location="{{redirect}}"</script>
<meta http-equiv="refresh" content="0;url={{redirect}}"/>
<style>html{background:#000;color:#fff}a{color:#0ff;font-family:monospace}</style>
<title>Redirecting</title><h1>Redirecting</h1>
<p>This page has been moved to <a href="{{redirect}}">{{redirect}}</a> if you aren't automatically redirected, please click the following link to proceed to the new location of this page: <a href="{{redirect}}">{{redirect}}</a></p>
<html lang="en-US">

<head>
<style>
html { background: #000; color: #fff }
a { color: #0ff; font-family: monospace }
</style>
<link rel="canonical" href="{{redirect}}" />
<meta charset="utf-8" />
<meta name="robots" content="noindex" />
<script>location.replace("{{redirect}}")</script>
<meta http-equiv="reload" content="0; url={{redirect}}" />
<title>Redirecting...</title>
</head>

<body>
<main>
<h1>Redirecting...</h1>
<p>This page has been moved to <a href="{{redirect}}">{{redirect}}</a> if you aren't automatically redirected, please click the following link to proceed to the new location of this page: <a href="{{redirect}}">{{redirect}}</a></p>
</main>
</body>

</html>

0 comments on commit 623b730

Please sign in to comment.