diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim index 9de75b8..6526e49 100644 --- a/app/views/layouts/application.html.slim +++ b/app/views/layouts/application.html.slim @@ -5,6 +5,7 @@ html = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true = javascript_include_tag 'vendor/modernizr' = csrf_meta_tags + = auto_discovery_link_tag(:rss, params.merge(format: :rss)) body .row diff --git a/app/views/search/index.rss.builder b/app/views/search/index.rss.builder index 11bb90d..6c488b6 100644 --- a/app/views/search/index.rss.builder +++ b/app/views/search/index.rss.builder @@ -8,7 +8,7 @@ xml.rss :version => "2.0" do @papers.each do |doc| xml.item do xml.title doc.name - xml.description article.content[0, doc.content.length < 30 ? doc.content.length : 30] + xml.description truncate(doc.content, length: 768) xml.pubDate doc.published_at.to_date.to_s(:rfc822) xml.link doc.url xml.guid doc.url