def load_properties
      props = PageProperties.new(self)
      content_files.each do |locale, content_file|
        if type_from_path(content_file) == :haml
          props.eval(File.read(content_file, :encoding => 'UTF-8'), locale)
        else
          headers, excerpt = parse_headers(content_file)
          props.eval(headers, locale)
          if !excerpt.empty?
            props.set_prop(locale, "excerpt", excerpt)
          end
          props.set_prop(locale, "content_type", type_from_path(content_file))
        end
        cleanup_properties(props, locale)
      end
      unless props.prop_without_inheritance(I18n.default_locale, :name)
        props.set_prop(I18n.default_locale, :name, self.name)
      end
      return props
    end
def load_properties
      props = PageProperties.new(self)
      content_files.each do |locale, content_file|
        if type_from_path(content_file) == :haml
          props.eval(File.read(content_file, :encoding => 'UTF-8'), locale)
        else
          headers, excerpt = parse_headers(content_file)
          props.eval(headers, locale)
          if !excerpt.empty?
            props.set_prop(locale, "excerpt", excerpt)
          end
          props.set_prop(locale, "content_type", type_from_path(content_file))
        end
        cleanup_properties(props, locale)
      end
      unless props.prop_without_inheritance(I18n.default_locale, :name)
        props.set_prop(I18n.default_locale, :name, self.name)
      end
      return props
    end
def self.relative_to_rails_view_root(absolute_path)
  if Rails.root
    absolute = Pathname.new(absolute_path)
    rails_view_root = Pathname.new(Rails.root + 'app/views')
    absolute.relative_path_from(rails_view_root).to_s
  end
end

 scans the source content files for property headers in the form:

    @variable = 'x'
    - @variable = 'x'

 (with or without leading hypen works)

 This text is extracted and evaluated as ruby to set properties.

 The first paragraph is loaded into the property "excerpt".