Skip to content

Commit 1d37b59

Browse files
committed
Deuxfleurs: remove Hugo aliases in favor of Dxfl redirects
1 parent 737f0d5 commit 1d37b59

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

app/models/communication/website/with_hosting.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ module Communication::Website::WithHosting
1515
end
1616

1717
def should_use_hugo_aliases?
18-
# TODO: remove hosted_with_deuxfleurs?
19-
hosted_with_undefined? || hosted_with_nginx? || hosted_with_deuxfleurs?
18+
hosted_with_undefined? || hosted_with_nginx?
2019
end
2120

2221
end

app/views/admin/communication/websites/configs/deuxfleurs_config/static.html.erb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,10 @@ Cache-Control = "max-age=31536000, no-transform, public"
1313
for = ["**/*.png", "**/*.jpg", "**/*.jpeg", "**/*.gif", "**/*.webp"]
1414
[headers.values]
1515
Cache-Control = "max-age=31536000, no-transform, public"
16+
17+
<% @website.permalinks.not_current.ordered.find_each do |permalink| %>
18+
[[redirects]]
19+
from = "<%= permalink.path %>"
20+
to = "<%= permalink.target %>"
21+
22+
<% end %>

0 commit comments

Comments
 (0)