module JekyllDeployShosetsu::Util
Public Class Methods
append_yaml_front_matter(path, yaml)
click to toggle source
# File lib/jekyll-deploy-shosetsu/util.rb, line 4 def append_yaml_front_matter(path, yaml) content = File.read(path) config = content[Jekyll::Document::YAML_FRONT_MATTER_REGEXP, 1] new_config = config + yaml new_content = content.gsub(config, new_config) File.write(path, new_content) end