Thanks to visit codestin.com Credit goes to github.com
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 def41cc commit beec731Copy full SHA for beec731
1 file changed
doc/sphinxext/redirect_from.py
@@ -77,6 +77,8 @@ def _generate_redirects(app, exception):
77
if builder.name != "html" or exception:
78
return
79
for k, v in RedirectFrom.redirects.items():
80
- with Path(app.outdir, k + builder.out_suffix).open("w") as file:
+ p = Path(app.outdir, k + builder.out_suffix)
81
+ Path(*p.parts[:-1]).mkdir(parents=True, exist_ok=True)
82
+ with p.open("x") as file:
83
logger.info('making refresh html file: ' + k + ' redirect to ' + v)
84
file.write(HTML_TEMPLATE.format(v=v))
0 commit comments