From e34392e77c78d26a3fdb6afadbebdc9d72a77fca Mon Sep 17 00:00:00 2001 From: f Date: Thu, 26 Oct 2023 18:09:20 -0300 Subject: [PATCH] fix: indexar cambios sin leer todo el sitio --- app/models/site/index.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/site/index.rb b/app/models/site/index.rb index 7a070e6d..dc9f266f 100644 --- a/app/models/site/index.rb +++ b/app/models/site/index.rb @@ -104,9 +104,10 @@ class Site indexable_posts.select do |delta| MODIFIED_STATUSES.include? delta.status end.each do |delta| - locale, path = locale_and_path_from(delta.new_file[:path]) + locale, _ = locale_and_path_from(delta.new_file[:path]) + full_path = File.join(self.path, delta.new_file[:path]) - posts(lang: locale).find(path).index! + Post.build(path: full_path, site: self, layout: Post.find_layout(full_path), locale: locale).index! end end