We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ed9ed3 commit 7eee6b2Copy full SHA for 7eee6b2
hooks.py
@@ -161,6 +161,9 @@ def on_post_build(config: MkDocsConfig):
161
template = '<!DOCTYPE html><html lang="en"><head><meta name="robots" content="noindex"><meta charset="utf-8"><meta http-equiv="refresh" content="0; url={}"></head></html>'
162
for redirect_page_uri, source_page_uri in REDIRECT_PAGES.items():
163
path = Path(redirect_page_uri)
164
- os.makedirs(path)
+ try:
165
+ os.makedirs(path)
166
+ except FileExistsError:
167
+ continue
168
index_html = path / "index.html"
169
index_html.write_text(template.format(source_page_uri))
0 commit comments