diff --git a/features/site_data.feature b/features/site_data.feature index ccb349c6..9ab94056 100644 --- a/features/site_data.feature +++ b/features/site_data.feature @@ -99,3 +99,9 @@ Feature: Site data When I run jekyll Then the _site directory should exist And I should see "http://mysite.com" in "_site/index.html" + + Scenario: Access Jekyll version via jekyll.version + Given I have an "index.html" page that contains "{{ jekyll.version }}" + When I run jekyll + Then the _site directory should exist + And I should see "\d+\.\d+\.\d+" in "_site/index.html" diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 9be1e0ae..f4a5bd0d 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -266,7 +266,8 @@ module Jekyll # "tags" - The Hash of tag values and Posts. # See Site#post_attr_hash for type info. def site_payload - {"site" => self.config.merge({ + {"jekyll" => { "version" => Jekyll::VERSION }, + "site" => self.config.merge({ "time" => self.time, "posts" => self.posts.sort { |a, b| b <=> a }, "pages" => self.pages,