Make configuration accessible from page.

For example, if you have the following in _config.yml:

  url: http://www.librador.com

...you can have the following in an HTML page:

  <a href="{{site.url}}">Home!</a>

This is a reapply of change 7b449239f0908e34f0290c213970e4b14ba2c2df on latest HEAD.

Signed-off-by: Nick Quaranto <nick@quaran.to>
This commit is contained in:
Martin Vilcans 2009-06-15 23:46:16 +02:00 committed by Nick Quaranto
parent 3bc4f590ea
commit 05e8deae8d
1 changed files with 2 additions and 2 deletions

View File

@ -221,11 +221,11 @@ module Jekyll
# "posts" => [<Post>],
# "categories" => [<Post>]}
def site_payload
{"site" => {
{"site" => self.config.merge({
"time" => Time.now,
"posts" => self.posts.sort { |a,b| b <=> a },
"categories" => post_attr_hash('categories'),
"tags" => post_attr_hash('tags')}}
"tags" => post_attr_hash('tags')})}
end
# Filter out any files/directories that are hidden or backup files (start