8000 TIL about /2/, or forgot about it. · python/docsbuild-scripts@83ea484 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 83ea484

Browse files
committed
TIL about /2/, or forgot about it.
1 parent 2593117 commit 83ea484

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

build_docs.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ def copy_build_to_webroot(self):
916916

917917

918918
def symlink(www_root: Path, language: Language, directory: str, name: str, group: str):
919-
"""Used by slash_3_symlink and dev_symlink to maintain symlinks."""
919+
"""Used by major_symlinks and dev_symlink to maintain symlinks."""
920920
if language.tag == "en": # english is rooted on /, no /en/
921921
path = www_root
922922
else:
@@ -933,8 +933,8 @@ def symlink(www_root: Path, language: Language, directory: str, name: str, group
933933
run(["chown", "-h", ":" + group, str(link)])
934934

935935

936-
def slash_3_symlink(www_root: Path, group):
937-
"""Maintains the /3/ symlinks for each languages.
936+
def major_symlinks(www_root: Path, group):
937+
"""Maintains the /2/ and /3/ symlinks for each languages.
938938
939939
Like:
940940
- /3/ → /3.9/
@@ -944,6 +944,7 @@ def slash_3_symlink(www_root: Path, group):
944944
current_stable = Version.current_stable().name
945945
for language in LANGUAGES:
946946
symlink(www_root, language, current_stable, "3", group)
947+
symlink(www_root, language, "2.7", "2", group)
947948

948949

949950
def dev_symlink(www_root: Path, group):
@@ -988,7 +989,7 @@ def main():
988989

989990
build_sitemap(args.www_root)
990991
build_robots_txt(args.www_root, args.group, args.skip_cache_invalidation)
991-
slash_3_symlink(args.www_root, args.group)
992+
major_symlinks(args.www_root, args.group)
992993
dev_symlink(args.www_root, args.group)
993994

994995

0 commit comments

Comments
 (0)
0