Sha256: 3b7b68550a21fb4675dd75f80a9e670e18d359c0f98a684d4d6f4b864e4e58f5

Contents?: true

Size: 1.02 KB

Versions: 6

Compression:

Stored size: 1.02 KB

Contents

xm.item do
  if item.is_a?(Note)
    xm.title truncate(item.html(:body).strip_html, length: 80, separator: ' ', omissions: '...')
  else
    xm.title item.title
  end
  content_html = fetch_html_content_for_feeds(item, this_blog)
  xm.description content_html + item.get_rss_description
  xm.pubDate item.published_at.rfc822
  xm.guid "urn:uuid:#{item.guid}", "isPermaLink" => "false"
  if item.link_to_author?
    xm.author "#{item.user.email} (#{item.user.name})"
  end

  if item.is_a?(Article)
    xm.comments(item.permalink_url("comments"))
    for tag in item.tags
      xm.category tag.display_name
    end
    # RSS 2.0 only allows a single enclosure per item, so only include the first one here.
    if not item.resources.empty?
      resource = item.resources.first
      xm.enclosure(
        :url => item.blog.file_url(resource.upload_url),
        :length => resource.size,
        :type => resource.mime)
      end
    end

  if item.allow_pings?
    xm.trackback :ping, item.trackback_url
  end
  xm.link item.permalink_url
end

Version data entries

6 entries across 6 versions & 1 rubygems

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