未验证 提交 b497f99e 编写于 作者: I Ivan Blinkov 提交者: GitHub

Update build.py

上级 5d7fd782
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册