module Jekyll::Utils

def deep_merge_hashes!(target, overwrite)

Thanks to whoever made it.

http://gemjack.com/gems/tartan-0.1.1/classes/Hash.html
This code was lovingly stolen from some random gem:

other_hash - the other hash whose values will be persisted after the merge
master_hash - the "parent" hash whose values will be overridden

Merges a master hash with another hash, recursively.
def deep_merge_hashes!(target, overwrite)
  merge_values(target, overwrite)
  merge_default_proc(target, overwrite)
  duplicate_frozen_values(target)
  target
end