Skip to content
Snippets Groups Projects
Commit 6b42119d authored by pabois's avatar pabois
Browse files

change post pattern

parent bf06eb0f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment