Fix unicode-input docs redirect

This commit is contained in:
pagedown 2021-12-10 20:29:09 +08:00
parent 3d98501e57
commit 0d4a62ccb5
No known key found for this signature in database
GPG Key ID: E921CF18AC8FF6EB

View File

@ -111,7 +111,10 @@ def add_old_redirects(loc: str) -> None:
link_name = os.path.join(base, f'{bname}.html') if base else f'{bname}.html' link_name = os.path.join(base, f'{bname}.html') if base else f'{bname}.html'
generate_redirect_html(link_name, bname) generate_redirect_html(link_name, bname)
generate_redirect_html(os.path.join(loc, 'kittens', 'unicode-input.html'), 'unicode_input') old_unicode_input_path = os.path.join(loc, 'kittens', 'unicode-input')
os.makedirs(old_unicode_input_path, exist_ok=True)
generate_redirect_html(os.path.join(old_unicode_input_path, 'index.html'), '../unicode_input')
generate_redirect_html(f'{old_unicode_input_path}.html', 'unicode_input')
def run_docs(args: Any) -> None: def run_docs(args: Any) -> None: