mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 06:56:22 +00:00
Merge branch 'jekyll-service' into panel.sutty.nl
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:
commit
3fea6c4748
1 changed files with 8 additions and 1 deletions
|
@ -119,13 +119,20 @@ class MetadataFile < MetadataTemplate
|
||||||
rescue Errno::ENOENT => e
|
rescue Errno::ENOENT => e
|
||||||
ExceptionNotifier.notify_exception(e, data: { site: site.name, path: value['path'] })
|
ExceptionNotifier.notify_exception(e, data: { site: site.name, path: value['path'] })
|
||||||
|
|
||||||
Pathname.new(value['path'])
|
Pathname.new(File.join(site.path, value['path']))
|
||||||
end
|
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
|
def relative_destination_path_with_filename
|
||||||
destination_path_with_filename.relative_path_from(Pathname.new(site.path).realpath)
|
destination_path_with_filename.relative_path_from(Pathname.new(site.path).realpath)
|
||||||
rescue ArgumentError => e
|
rescue ArgumentError => e
|
||||||
ExceptionNotifier.notify_exception(e, data: { site: site.name, path: value['path'] })
|
ExceptionNotifier.notify_exception(e, data: { site: site.name, path: value['path'] })
|
||||||
|
|
||||||
|
value['path']
|
||||||
end
|
end
|
||||||
|
|
||||||
def static_file_path
|
def static_file_path
|
||||||
|
|
Loading…
Reference in a new issue