Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

access to site object inside haml templates

  • Loading branch information...
commit f2a6b2b1e0392328feba33ef50a3f6a364134f68 1 parent dc65371
@darrikmazey darrikmazey authored
Showing with 9 additions and 2 deletions.
  1. +6 −1 lib/jekyll/converter.rb
  2. +3 −1 lib/jekyll/site.rb
View
7 lib/jekyll/converter.rb
@@ -45,6 +45,11 @@ def pygments_prefix
def pygments_suffix
self.class.pygments_suffix
end
+
+ def locals(locals = nil)
+ @locals = locals if locals
+ @locals
+ end
end
-end
+end
View
4 lib/jekyll/site.rb
@@ -83,7 +83,9 @@ def setup
self.converters = Jekyll::Converter.subclasses.select do |c|
!self.safe || c.safe
end.map do |c|
- c.new(self.config)
+ conv = c.new(self.config)
+ conv.locals({:site => self})
+ conv
end
self.generators = Jekyll::Generator.subclasses.select do |c|
Please sign in to comment.
Something went wrong with that request. Please try again.