5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-05 19:45:46 +00:00

Merge branch 'jekyll-service' into panel.sutty.nl
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
f 2023-01-11 17:07:49 -03:00
commit 3fea6c4748

View file

@ -119,13 +119,20 @@ class MetadataFile < MetadataTemplate
rescue Errno::ENOENT => e
ExceptionNotifier.notify_exception(e, data: { site: site.name, path: value['path'] })
Pathname.new(value['path'])
Pathname.new(File.join(site.path, value['path']))
end
# Obtener la ruta relativa al sitio.
#
# Si algo falla, devolver la ruta original para no romper el archivo.
#
# @return [String, nil]
def relative_destination_path_with_filename
destination_path_with_filename.relative_path_from(Pathname.new(site.path).realpath)
rescue ArgumentError => e
ExceptionNotifier.notify_exception(e, data: { site: site.name, path: value['path'] })
value['path']
end
def static_file_path