mkdocs / mkdocs-redirects

Open source plugin for Mkdocs page redirects
MIT License
176 stars 25 forks source link

On Windows this creates invalid URL using \ instead of / #27

Closed frankkopp closed 2 years ago

frankkopp commented 3 years ago

On Windows this creates:

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Redirecting...</title>
    <link rel="canonical" href="..\abc\def.html">
    <meta name="robots" content="noindex">
    <script>var anchor=window.location.hash.substr(1);location.href="..\abc\def.html"+(anchor?"#"+anchor:"")</script>
    <meta http-equiv="refresh" content="0; url=..\abc\def.html">
</head>
<body>
Redirecting...
</body>
</html>

I assume using os.path.join is the cause issues, especially when not converting to valid URL at the end.