From b497f99e34594c6800aea1d766bfe6fd32f1c2bd Mon Sep 17 00:00:00 2001 From: Ivan Blinkov Date: Sun, 3 May 2020 20:06:31 +0300 Subject: [PATCH] Update build.py --- docs/tools/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tools/build.py b/docs/tools/build.py index 5649d17629..bc5944dd9a 100755 --- a/docs/tools/build.py +++ b/docs/tools/build.py @@ -332,7 +332,7 @@ def build_redirect_html(args, from_path, to_path): from_path.replace('/index.md', '/index.html').replace('.md', '/index.html') ) version_prefix = f'/{args.version_prefix}/' if args.version_prefix else '/' - target_path = to_path.replace('.md', '/') + target_path = to_path.replace('/index.md', '/').replace('.md', '/') to_url = f'/docs{version_prefix}{lang}/{target_path}' to_url = to_url.strip() write_redirect_html(out_path, to_url) -- GitLab