Module: OrthorHelper

Defined in:
lib/orthor_helper.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



24
25
26
27
28
# File 'lib/orthor_helper.rb', line 24

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

#keywordsObject



18
19
20
21
22
# File 'lib/orthor_helper.rb', line 18

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

#orthor_category(id, template = nil) ⇒ Object



6
7
8
# File 'lib/orthor_helper.rb', line 6

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

#orthor_content(id, template = nil) ⇒ Object



2
3
4
# File 'lib/orthor_helper.rb', line 2

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

#orthor_feed(id) ⇒ Object



14
15
16
# File 'lib/orthor_helper.rb', line 14

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

#orthor_feed_tagsObject



30
31
32
33
34
# File 'lib/orthor_helper.rb', line 30

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

#orthor_page_titleObject



36
37
38
# File 'lib/orthor_helper.rb', line 36

def orthor_page_title
  @orthor_page_title
end

#orthor_query(id, template = nil) ⇒ Object



10
11
12
# File 'lib/orthor_helper.rb', line 10

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