Sha256: 7f4e2007075b4617b5f9c1f950617d6435f2bf65dc50a3cbb66de947f32009d3

Contents?: true

Size: 913 Bytes

Versions: 4

Compression:

Stored size: 913 Bytes

Contents

module Shakespeare
  module ViewHelpers
    def page_title
      return if page_content.nil? or page_content.title.blank?
      page_content.title
    end
    
    def description_meta_tag
      return if page_content.nil? or page_content.description.blank?
      %Q[<meta name="description" content="#{page_content.description}">]
    end
    
    def keywords_meta_tag
      return if page_content.nil? or page_content.keywords.blank?
      %Q[<meta name="keywords" content="#{page_content.keywords}">]
    end
    
    def robots_meta_tag
      return if page_content.nil? or page_content.robots.blank?
      %Q[<meta name="robots" content="#{page_content.robots}">]
    end
    
    def canonical_link_tag
      return if page_content.nil? or page_content.canonical.blank?
      return unless page_content.enable_canonical?
      %Q[<link href="#{page_content.canonical}" rel="canonical" />]
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shakespeare-0.3.4 lib/shakespeare/view_helpers.rb
shakespeare-0.3.2 lib/shakespeare/view_helpers.rb
shakespeare-0.3.1 lib/shakespeare/view_helpers.rb
shakespeare-0.1.0 lib/shakespeare/view_helpers.rb