|
47 | 47 |
|
48 | 48 |
|
49 | 49 | # Single file redirects are handled in this file and can be done by a pylint
|
50 |
| -# contributor if no englobing full directory redirect is applied first. See: |
| 50 | +# contributor See: |
51 | 51 | # https://documatt.gitlab.io/sphinx-reredirects/usage.html
|
52 | 52 | # Directory redirects are handled in ReadTheDoc admin interface and can only be done
|
53 | 53 | # by pylint maintainers at the following URL:
|
54 | 54 | # https://readthedocs.org/dashboard/pylint/redirects/
|
55 | 55 | DIRECTORY_REDIRECT = [
|
56 | 56 | # This list has no effect it must be manually updated from the Read the doc conf
|
57 | 57 | "messages/",
|
| 58 | + # If an englobing full directory redirect is applied first then it's impossible to |
| 59 | + # redirect a single link directly. For this you'll need to redirect the redirected link. |
| 60 | + # I.e. 'messages/old => messages/another_dir/new.html' is impossible. |
| 61 | + # But you can do 'messages/another_dir/old => messages/another_dir/new.html' |
58 | 62 | ]
|
59 | 63 | redirects: dict[str, str] = {
|
60 | 64 | # "<source>": "<target>"
|
61 | 65 | "intro": "index.html",
|
62 | 66 | "support": "contact.html",
|
63 | 67 | "user_guide/ide-integration": "installation.html",
|
64 | 68 | "user_guide/message-control": "user_guide/messages/message_control.html",
|
| 69 | + "user_guide/messages/messages_introduction": "user_guide/messages/index.html", |
| 70 | + "user_guide/messages/messages_list": "user_guide/messages/messages_overview.html", |
65 | 71 | }
|
66 | 72 | for m in redirects:
|
67 | 73 | for r in DIRECTORY_REDIRECT:
|
68 | 74 | assert not m.startswith(r), (
|
69 |
| - f"Redirection will silentely fail: '{m}' start with '{r}' and " |
| 75 | + f"Redirection will silently fail: '{m}' start with '{r}' and " |
70 | 76 | "the whole directory is redirected by ReadtheDoc conf already."
|
71 | 77 | )
|
72 | 78 |
|
|
0 commit comments