Sha256: 4ba27643bbe3d71cbe8ecb6f8e61ba40b6d5f4d432c08f7d2ef8aa2e847ef7d8

Contents?: true

Size: 752 Bytes

Versions: 1

Compression:

Stored size: 752 Bytes

Contents

xml.instruct!
xml.rss "version" => "2.0", "xmlns:dc" => "htt://purl.org/dc/elements/1.1/" do
  xml.channel do

    xml.title blogit_conf.rss_feed_title

    xml.description blogit_conf.rss_feed_description

    xml.pubDate CGI.rfc1123_date @posts.first.try(:updated_at)

    xml.link blog_root_url

    xml.lastBuildDate CGI.rfc1123_date @posts.first.try(:updated_at)

    xml.language I18n.locale
    
    @posts.each do |post|

      xml.item do
        xml.title post.title
        xml.description format_content(truncate(post.body, length: 400)).html_safe
        xml.link post_url(post)
        xml.pubDate CGI.rfc1123_date(post.updated_at)
        xml.guid post_url(post)
        xml.author post.blogger_display_name
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blogit-0.7.0 app/views/blogit/posts/index.rss.builder