Sha256: 9157efba8232013caadcdb6808104d38bc3f177172589b351ade6fdc123c4baf

Contents?: true

Size: 941 Bytes

Versions: 5

Compression:

Stored size: 941 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

5 entries across 5 versions & 1 rubygems

Version Path
shakespeare-0.3.0 lib/shakespeare/view_helpers.rb
shakespeare-0.2.2 lib/shakespeare/view_helpers.rb
shakespeare-0.2.1 lib/shakespeare/view_helpers.rb
shakespeare-0.2.0 lib/shakespeare/view_helpers.rb
shakespeare-0.1.1 lib/shakespeare/view_helpers.rb