Skip to content

Commit 940ae08

Browse files
committed
fix redirect pages build
1 parent 3d59435 commit 940ae08

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hooks.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,5 +161,6 @@ def on_post_build(config: MkDocsConfig):
161161
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>'
162162
for redirect_page_uri, source_page_uri in REDIRECT_PAGES.items():
163163
path = Path(redirect_page_uri)
164-
os.makedirs(path.parent)
165-
path.write_text(template.format(source_page_uri))
164+
os.makedirs(path)
165+
index_html = path / "index.html"
166+
index_html.write_text(template.format(source_page_uri))

0 commit comments

Comments
 (0)