Skip to content
Browse files

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>
  • Loading branch information...
1 parent 1334aaf commit 7b449239f0908e34f0290c213970e4b14ba2c2df @vilcans vilcans committed Apr 5, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/jekyll/site.rb
View
4 lib/jekyll/site.rb
@@ -218,13 +218,13 @@ def post_attr_hash(post_attr)
# "tags" => [<Post>],
# "topics" => [<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'),
"topics" => post_attr_hash('topics')
- }}
+ })}
end
# Filter out any files/directories that are hidden or backup files (start

0 comments on commit 7b44923

Please sign in to comment.
Something went wrong with that request. Please try again.