Class: Octopress::Ink::Tags::FeedsTag

Inherits:
Liquid::Tag
  • Object
show all
Defined in:
lib/octopress-ink/tags/feeds_tag.rb

Instance Method Summary collapse

Instance Method Details

#render(context) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/octopress-ink/tags/feeds_tag.rb', line 5

def render(context)
  tags = []
  Bootstrap.feeds.each do |url, title|
    tags << tag(url, title)
  end
  tags.join("\n")
end

#tag(url, title) ⇒ Object



13
14
15
# File 'lib/octopress-ink/tags/feeds_tag.rb', line 13

def tag(url, title)
  %Q{<link href="#{File.join('/', Octopress.site.config['baseurl'], url).sub('index.xml', '')}" title="#{title}" rel="alternate" type="application/atom+xml">}
end