5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-25 13:26:21 +00:00

fix: solo cargar archivos en public/
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
f 2024-02-02 14:07:09 -03:00
parent 32d68ee194
commit 9837aa72aa
No known key found for this signature in database

View file

@ -80,13 +80,18 @@ class Site
end end
end end
# Encuentra todos los archivos estáticos a reindexar # Encuentra todos los archivos estáticos a reindexar, si fueron
# borrados necesitamos saber la ubicación anterior, si son nuevos,
# la nueva.
# #
# @return [Array<Rugged::Diff::Delta>] # @return [Array<Rugged::Diff::Delta>]
def indexable_static_files def indexable_static_files
@indexable_static_files ||= @indexable_static_files ||=
diff_with_head.each_delta.select do |delta| diff_with_head.each_delta.select do |delta|
delta.old_file[:path].start_with? 'public/' (
delta.status == :deleted &&
delta.old_file[:path].start_with?('public/')
) || delta.new_file[:path].start_with?('public/')
end end
end end