Skip to content

Commit cd0068b

Browse files
committed
plugins/redirects: strip index.html suffix from redirect path if present
Signed-off-by: Ruby Iris Juric <[email protected]>
1 parent 5cdd234 commit cd0068b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/generator_redirects.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def initialize(site, base, dir, name, redirect_to)
6666

6767
process(@name)
6868
read_yaml(File.join(base, '_layouts', 'utils'), 'redirect_permanent.html')
69-
data['redirect_to'] = redirect_to
69+
data['redirect_to'] = redirect_to.delete_suffix('index.html')
7070
end
7171
end
7272
end

0 commit comments

Comments
 (0)