class Jekyll::Site

Extend Jekyll Site class

Public Instance Methods

find_page(*args) click to toggle source

Load page by attribute

# File lib/jekyll-page_extensions.rb, line 157
def find_page(*args)
  options = args.extract_options!
  attribute = options.keys.first
  self.pages.detect { |page| eval("page.#{Page.method_defined?(attribute) ? attribute : "data['#{attribute}']"}") == options[attribute] }
end