From 780cff46b389a7ee121be80d9ef115d28f3c1b69 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 17 May 2014 00:38:21 -0400 Subject: [PATCH] Add jekyll.environment to site_payload. --- lib/jekyll/site.rb | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 5f1580bb..9efe2500 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -314,19 +314,23 @@ module Jekyll # "tags" - The Hash of tag values and Posts. # See Site#post_attr_hash for type info. def site_payload - {"jekyll" => { "version" => Jekyll::VERSION }, - "site" => Utils.deep_merge_hashes(config, - Utils.deep_merge_hashes(Hash[collections.map{|label, coll| [label, coll.docs]}], { - "time" => time, - "posts" => posts.sort { |a, b| b <=> a }, - "pages" => pages, - "static_files" => static_files.sort { |a, b| a.relative_path <=> b.relative_path }, - "html_pages" => pages.reject { |page| !page.html? }, - "categories" => post_attr_hash('categories'), - "tags" => post_attr_hash('tags'), - "collections" => collections, - "documents" => documents, - "data" => site_data + { + "jekyll" => { + "version" => Jekyll::VERSION, + "environment" => Jekyll.env + }, + "site" => Utils.deep_merge_hashes(config, + Utils.deep_merge_hashes(Hash[collections.map{|label, coll| [label, coll.docs]}], { + "time" => time, + "posts" => posts.sort { |a, b| b <=> a }, + "pages" => pages, + "static_files" => static_files.sort { |a, b| a.relative_path <=> b.relative_path }, + "html_pages" => pages.reject { |page| !page.html? }, + "categories" => post_attr_hash('categories'), + "tags" => post_attr_hash('tags'), + "collections" => collections, + "documents" => documents, + "data" => site_data })) } end