Merge pull request #1481 from mojombo/pathawks-patch-1
Expose Jekyll version to templates: `jekyll.version`
This commit is contained in:
commit
3212aac4bc
|
@ -99,3 +99,9 @@ Feature: Site data
|
||||||
When I run jekyll
|
When I run jekyll
|
||||||
Then the _site directory should exist
|
Then the _site directory should exist
|
||||||
And I should see "http://mysite.com" in "_site/index.html"
|
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"
|
||||||
|
|
|
@ -266,7 +266,8 @@ module Jekyll
|
||||||
# "tags" - The Hash of tag values and Posts.
|
# "tags" - The Hash of tag values and Posts.
|
||||||
# See Site#post_attr_hash for type info.
|
# See Site#post_attr_hash for type info.
|
||||||
def site_payload
|
def site_payload
|
||||||
{"site" => self.config.merge({
|
{"jekyll" => { "version" => Jekyll::VERSION },
|
||||||
|
"site" => self.config.merge({
|
||||||
"time" => self.time,
|
"time" => self.time,
|
||||||
"posts" => self.posts.sort { |a, b| b <=> a },
|
"posts" => self.posts.sort { |a, b| b <=> a },
|
||||||
"pages" => self.pages,
|
"pages" => self.pages,
|
||||||
|
|
Loading…
Reference in New Issue