8000 Remove `mkdocs-redirect` monkeypatching (#11072) · pydantic/pydantic@cc01258 · GitHub
[go: up one dir, main page]

Skip to content

Commit cc01258

Browse files
authored
Remove mkdocs-redirect monkeypatching (#11072)
1 parent c571058 commit cc01258

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

docs/plugins/main.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,30 +40,9 @@ def on_pre_build(config: Config) -> None:
4040
"""
4141
Before the build starts.
4242
"""
43-
import mkdocs_redirects.plugin
44-
4543
add_changelog()
4644
add_mkdocs_run_deps()
4745

48-
# work around for very unfortunate bug in mkdocs-redirects:
49-
# https://github.com/mkdocs/mkdocs-redirects/issues/65
50-
mkdocs_redirects.plugin.HTML_TEMPLATE = """
51-
<!doctype html>
52-
<html lang="en">
53-
<head>
54-
<meta charset="utf-8">
55-
<title>Redirecting...</title>
56-
<link rel="canonical" href="{url}">
57-
<!-- remove problematic tag here -->
58-
<script>var anchor=window.location.hash.substr(1);location.href="{url}"+(anchor?"#"+anchor:"")</script>
59-
<meta http-equiv="refresh" content="0; url={url}">
60-
</head>
61-
<body>
62-
Redirecting...
63-
</body>
64-
</html>
65-
"""
66-
6746

6847
def on_files(files: Files, config: Config) -> Files:
6948
"""

0 commit comments

Comments
 (0)
0