Sha256: b0eaeb8144da163f8b38df1d7a7e7016492362b506350ae5d8713a5c6bfe39fb

Contents?: true

Size: 973 Bytes

Versions: 1

Compression:

Stored size: 973 Bytes

Contents

module OrthorHelper
  def orthor_content(id, template = nil)
    return Orthorings.content(id, template)
  end

  def orthor_category(id, template = nil)
    return Orthorings.category(id, template)
  end

  def orthor_query(id, template = nil)
    return Orthorings.query(id, template)
  end

  def orthor_feed(id)
    return Orthorings.feed(id)
  end

  def keywords
    content = @meta_keywords || Orthor::Site.keywords
    return if content.nil? || content.empty?
    %Q(<meta content="#{content}" name="keywords" />)
  end

  def description
    content = @meta_description || Orthor::Site.description
    return if content.nil? || content.empty?
    %Q(<meta content="#{content}" name="description" />)
  end

  def orthor_feed_tags
    (Orthor::Site.feeds + (@orthor_feeds.nil? ? [] : @orthor_feeds)).inject("") do |html, feed|
      html += %Q(<link rel="alternate" type="application/rss+xml" title="#{feed.name || "RSS"}" href="#{feed.path}" />)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
orthorings-0.4.0 lib/orthor_helper.rb