mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-25 11:36:22 +00:00
fix: solo cargar archivos en public/
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
32d68ee194
commit
9837aa72aa
1 changed files with 7 additions and 2 deletions
|
@ -80,13 +80,18 @@ class Site
|
|||
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>]
|
||||
def indexable_static_files
|
||||
@indexable_static_files ||=
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue