class JekyllMetaFiles::Generator
Public Instance Methods
generate(site)
click to toggle source
# File lib/jekyll-meta-files.rb, line 5 def generate(site) document_path = site.config['documents_url'] site.static_files.each do |doc| meta_file = doc.path.gsub(/#{document_path}\w+\//, "#{document_path}meta/") + '.meta.yml' if File.exist?(meta_file) meta_data = SafeYAML.load_file(meta_file) meta_data.each { |key, value| doc.data[key] = value} end end end