Class: JekyllMetaFiles::Generator
- Inherits:
-
Jekyll::Generator
- Object
- Jekyll::Generator
- JekyllMetaFiles::Generator
- Defined in:
- lib/jekyll-meta-files.rb
Instance Method Summary collapse
Instance Method Details
#generate(site) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/jekyll-meta-files.rb', line 5 def generate(site) document_path = site.config['documents_url'] site.static_files.each do |doc| = doc.path.gsub(/#{document_path}\w+\//, "#{document_path}meta/") + '.meta.yml' if File.exist?() = SafeYAML.load_file() .each { |key, value| doc.data[key] = value} end end end |