Sha256: ac1aff199c85796ed246984508fb734c4c16dbeee1e1fabc4034cbfcad3a2525

Contents?: true

Size: 1.29 KB

Versions: 6

Compression:

Stored size: 1.29 KB

Contents

feed.entry item, :id => "urn:uuid:#{item.guid}", :url => item.permalink_url do |entry|
  entry.author do
    name = item.user.name rescue item.author
    email = item.user.email rescue nil
    entry.name name
    entry.email email if this_blog.link_to_author unless email.blank?
  end

  if item.is_a?(Note)
    entry.title truncate(item.html(:body).strip_html, length: 80, separator: ' ', omissions: '...'), "type"=>"html"
  else
    entry.title item.title, "type"=>"html"
  end

  if item.is_a?(Article)

    item.tags.each do |tag|
      entry.category "term" => tag.display_name, "scheme" => tag.permalink_url
    end

    item.resources.each do |resource|
      if resource.size > 0  # The Atom spec disallows files with size=0
        entry.tag! :link, "rel" => "enclosure",
              :type => resource.mime,
              :title => item.title,
              :href => this_blog.file_url(resource.upload_url),
              :length => resource.size
      else
        entry.tag! :link, "rel" => "enclosure",
              :type => resource.mime,
              :title => item.title,
              :href => this_blog.file_url(resource.upload_url)
      end
    end
  end
  content_html = fetch_html_content_for_feeds(item, this_blog)
  entry.content content_html + item.get_rss_description, "type"=>"html"
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
publify_core-9.0.0.pre6 app/views/shared/_atom_item_article.atom.builder
publify_core-9.0.0.pre5 app/views/shared/_atom_item_article.atom.builder
publify_core-9.0.0.pre4 app/views/shared/_atom_item_article.atom.builder
publify_core-9.0.0.pre3 app/views/shared/_atom_item_article.atom.builder
publify_core-9.0.0.pre2 app/views/shared/_atom_item_article.atom.builder
publify_core-9.0.0.pre1 app/views/shared/_atom_item_article.atom.builder