module Orthor class Site class << self include Orthor::Collections include Orthor::HttpCaching include Orthor::MetaData dsl_accessor :layout def define(&block) @feeds, @categories, @pages, @static_pages, @queries = [], [], [], [], [] layout(:orthor_layout) cache_for 0 keywords "" description "" class_eval &block end def find_resource_by_path(path) Orthor::Site.resources.detect { |r| r.path == path } end def find_resource_by_page_path(path, id) Orthor::Site.resources.detect { |r| r.is_a?(Orthor::Category) && r.page_path.gsub(":id", id) == path } end end end end