diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index a4a0f9f3..82b82048 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -3,8 +3,9 @@ module Jekyll class Page include Convertible + attr_writer :dir attr_accessor :site, :pager - attr_accessor :name, :ext, :basename, :dir + attr_accessor :name, :ext, :basename attr_accessor :data, :content, :output # Initialize a new Page. diff --git a/lib/jekyll/plugin.rb b/lib/jekyll/plugin.rb index 208472f0..600f326d 100644 --- a/lib/jekyll/plugin.rb +++ b/lib/jekyll/plugin.rb @@ -34,6 +34,7 @@ module Jekyll # # Returns the Symbol priority. def self.priority(priority = nil) + @priority ||= nil if priority && PRIORITIES.has_key?(priority) @priority = priority end diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 69ea43e7..9c24f8e4 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -266,7 +266,7 @@ module Jekyll def post_attr_hash(post_attr) # Build a hash map based on the specified post attribute ( post attr => # array of posts ) then sort each array in reverse order. - hash = Hash.new { |hash, key| hash[key] = Array.new } + hash = Hash.new { |hsh, key| hsh[key] = Array.new } self.posts.each { |p| p.send(post_attr.to_sym).each { |t| hash[t] << p } } hash.values.map { |sortme| sortme.sort! { |a, b| b <=> a } } hash