Module: Jekyll::ConrefifierUtils
- Defined in:
- lib/jekyll-conrefifier.rb
Class Method Summary collapse
-
.data_file_variables(config, path) ⇒ Object
fetch the custom scope vars, as defined in _config.yml.
Class Method Details
.data_file_variables(config, path) ⇒ Object
fetch the custom scope vars, as defined in _config.yml
4 5 6 7 8 9 10 11 12 |
# File 'lib/jekyll-conrefifier.rb', line 4 def self.data_file_variables(config, path) data_vars = {} scopes = config['data_file_variables'].select { |v| v['scope']['path'].empty? || Regexp.new(v['scope']['path']) =~ path } scopes.each do |scope| data_vars = data_vars.merge(scope['values']) end data_vars end |