diff --git a/app/models/communication/website/permalink/post.rb b/app/models/communication/website/permalink/post.rb index ea9da6cac438db5747ede529ab97fd9ce15f0d50..0c4e62332a0b0cc24ae0ecaf75bf3ad083005781 100644 --- a/app/models/communication/website/permalink/post.rb +++ b/app/models/communication/website/permalink/post.rb @@ -7,10 +7,10 @@ class Communication::Website::Permalink::Post < Communication::Website::Permalin :posts end - # /actualites/2022/10/21/un-article/ + # /actualites/2022-10-21/un-article/ # Pas de /fr au dƩbut, parce qu'Hugo a besoin du permalink sans langue def self.pattern_in_website(website) - "#{website.special_page(:communication_posts).path_without_language}:year/:month/:day/:slug/" + "#{website.special_page(:communication_posts).path_without_language}:year-:month-:day-:slug/" end protected diff --git a/app/views/admin/application/static/_permalink.html.erb b/app/views/admin/application/static/_permalink.html.erb index 114151438db08b0174c83cf7dfb73e676425ea4e..754eaa1494af7cc093f36fea65662eb14c76a1a0 100644 --- a/app/views/admin/application/static/_permalink.html.erb +++ b/app/views/admin/application/static/_permalink.html.erb @@ -2,7 +2,6 @@ url: "<%= @about.current_permalink_in_website(@website)&.path %>" <% if @about.respond_to?(:slug) && @about.slug.present? %> slug: "<%= @about.slug %>" <% end %> -<%# TODO: Understand why a "/" alias break some builds %> <% previous_permalinks = @about.previous_permalinks_in_website(@website).where.not(path: "/") if previous_permalinks.any?