Skip to content
Snippets Groups Projects
Unverified Commit dea825cf authored by Pierre-André Boissinot's avatar Pierre-André Boissinot Committed by GitHub
Browse files

Merge pull request #620 from noesya/new_posts_path_structure

Modification du pattern des urls des posts
parents bf06eb0f f13bc779
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