Skip to content

Commit 39fdd8c

Browse files
Allow redirect with or without trailing .html.
1 parent 1f580b5 commit 39fdd8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def write_redirects(aggregate: AggregateIndex, data: Data, output_dir: Path):
5151
))
5252
else:
5353
chapter = chapters[chapter_indices[0]]
54-
redirects[f'/{script}.html'] = f'/{chapter}/{script}.html'
54+
redirects[f'/{script}*'] = f'/{chapter}/{script}.html'
5555
with open(output_dir / '_redirects', 'w') as redirects_file:
5656
for old_path, new_path in redirects.items():
5757
redirects_file.write(f'{old_path} {new_path}\n')

0 commit comments

Comments
 (0)