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

Merge branch 'issue-16117' into 'rails'

fix: solo permitir los mismos tipos de archivo que jekyll

Closes #16117

See merge request sutty/sutty!259
This commit is contained in:
fauno 2024-05-02 18:29:26 +00:00
commit 1dd60bb834

View file

@ -14,6 +14,8 @@ module Jekyll
extend ActiveSupport::Concern
included do
DATA_EXTENSIONS = %w[.yaml .yml .json .csv .tsv].freeze
def read_data_to(dir, data)
return unless File.directory?(dir) && !@entry_filter.symlink?(dir)
@ -24,7 +26,7 @@ module Jekyll
if File.directory?(path)
read_data_to(path, data[sanitize_filename(entry)] = {})
else
elsif DATA_EXTENSIONS.include?(File.extname(entry))
key = sanitize_filename(File.basename(entry, ".*"))
data[key] = read_data_file(path)
end