We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1f4d34a + 2499c28 commit a2a2da6Copy full SHA for a2a2da6
scripts/caseinsensitive_redirects.py
@@ -37,11 +37,13 @@ def generate_case_combinations(name):
37
repo_root = Path(__file__).parents[1]
38
39
for path in repo_root.glob('_materials/*.md'):
40
+ path_parent = path.relative_to(repo_root).parent
41
with open(path) as f:
42
metadata, f = parse_yaml_header(f)
43
metadata.setdefault('redirect_from', [])
44
metadata['redirect_from'] += [
- n for n in generate_case_combinations(path.stem)
45
+ f'/{path_parent / path.with_name(n).stem}'
46
+ for n in generate_case_combinations(path.stem)
47
if n != path.stem
48
]
49
body = f.read()
0 commit comments