diff --git a/Rakefile b/Rakefile index 38a111cc..6b70c955 100644 --- a/Rakefile +++ b/Rakefile @@ -93,13 +93,12 @@ def siteify_file(file, front_matter = {}) title = contents.match(/\A# (.*)$/)[1] output_file = file.sub(/\.markdown\z/, ".md").downcase slug = File.basename(output_file, ".md") - default_frontmatter = { + front_matter = front_matter.merge({ "title" => title, "layout" => "docs", "permalink" => "/docs/#{slug}/", "note" => "This file is autogenerated. Edit /#{file} instead." - } - front_matter = front_matter.merge(default_frontmatter) + }) contents.gsub!(/\A# #{title}\n\n?/, "") contents = converted_history(contents) if output_file == "history.md" contents = "#{front_matter.to_yaml}---\n\n#{contents}"