From 5ea32780f9322601ec47e16bf70b40fcd202cb1d Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 18 Oct 2023 12:40:44 -0400 Subject: Improve redirect URLs For those that are already correct, list the correct URL on the main site, and mark them as "implicit" so we can double-check them. For those that remain, remove all old links to gitweb.tpo, and link to gitlab.tpo instead. --- bin/make_redirects.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bin') diff --git a/bin/make_redirects.py b/bin/make_redirects.py index 99a5ea3..ea8ea3b 100755 --- a/bin/make_redirects.py +++ b/bin/make_redirects.py @@ -24,10 +24,13 @@ def book_redirects(rs, spec_dir): for kwd, info in rs.items(): if os.path.isdir(os.path.join(spec_dir, kwd)): assert os.path.isfile(os.path.join(spec_dir, kwd, "index.md")) + assert info.get('implicit') continue elif any((os.path.isfile(os.path.join(spec_dir, kwd) + ext)) for ext in [".txt", ".md"]): + assert info.get('implicit') continue else: + assert not info.get('implicit') source = kwd + ".html" target = info['target'] lines.append( -- cgit v1.2.3-54-g00ecf