docs: create leading directories for redirects
This will be useful when removing entire directories from the docs, which will happen in an upcoming patch. Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7174>
This commit is contained in:
parent
b2c737cf57
commit
a85c3189fa
|
@ -15,6 +15,7 @@ def create_redirects(app, docname):
|
|||
return
|
||||
for src, dst in redirects:
|
||||
path = os.path.join(app.outdir, '{0}.html'.format(src))
|
||||
os.makedirs(os.path.dirname(path), exist_ok=True)
|
||||
with open(path, 'w') as f:
|
||||
f.write(create_redirect(dst))
|
||||
|
||||
|
|
Loading…
Reference in New Issue