diff --git a/app/models/research/journal/paper.rb b/app/models/research/journal/paper.rb index 9761f41a4f58d7687e46b175220e8e91740904fc..bf7e587d70010cbe6f1b2f91f76c0dbbdbd01477 100644 --- a/app/models/research/journal/paper.rb +++ b/app/models/research/journal/paper.rb @@ -67,7 +67,7 @@ class Research::Journal::Paper < ApplicationRecord scope :ordered, -> { order(published_at: :desc, created_at: :desc) } def git_path(website) - "#{git_path_content_prefix(website)}papers/#{published_at.year}/#{published_at.strftime "%Y-%m-%d"}-#{slug}.html" if (volume.nil? || volume.published_at) && published_at + "#{git_path_content_prefix(website)}papers/#{published_at.year}#{path}.html" if published_at end def template_static @@ -89,7 +89,7 @@ class Research::Journal::Paper < ApplicationRecord end def path - "/#{slug}" + "/#{published_at.strftime "%Y-%m-%d"}-#{slug}" if published_at end protected diff --git a/app/models/research/journal/volume.rb b/app/models/research/journal/volume.rb index 7954879f64c50607d1a5c0b6ccf18ae3eb2599e0..2779adf14632a90df2233a4e8bf2a20761c72f43 100644 --- a/app/models/research/journal/volume.rb +++ b/app/models/research/journal/volume.rb @@ -54,7 +54,7 @@ class Research::Journal::Volume < ApplicationRecord end def git_path(website) - "#{git_path_content_prefix(website)}volumes/#{published_at.year}/#{slug}/_index.html" if published_at + "#{git_path_content_prefix(website)}volumes/#{published_at.year}#{path}/_index.html" if published_at end def template_static @@ -77,7 +77,7 @@ class Research::Journal::Volume < ApplicationRecord end def path - "/#{published_at&.year}/#{slug}" if published_at + "/#{published_at&.year}-#{slug}" if published_at end def to_s