about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-11-10 20:25:49 +0000
committerEric Wong <e@80x24.org>2015-11-10 20:27:35 +0000
commit97ade9d8d5d751c197b61faee5f3ae6589b6b432 (patch)
treedfd1fda1031ca34dce13179e1542411810e54487
parent0c7c2d0c7d4cb89704c4e75c7194edf2bfd59686 (diff)
downloadcmogstored-97ade9d8d5d751c197b61faee5f3ae6589b6b432.tar.gz
The pre-formatted HTML is readable as raw XML, and feed readers
tend to have no problem rendering the HTML, so there's no point
in nearly doubling our bandwidth usage on the text-only part
given we're already serving XML.

While we're at it, disable XML indentation to avoid wasting space;
it doesn't significantly hamper readability, either.
-rw-r--r--Rakefile4
1 files changed, 1 insertions, 3 deletions
diff --git a/Rakefile b/Rakefile
index be3564b..bb1c22a 100644
--- a/Rakefile
+++ b/Rakefile
@@ -32,7 +32,7 @@ desc 'prints news as an Atom feed'
 task :news_atom do
   require 'builder' # gem install builder
   new_tags = tags[0,10]
-  x = Builder::XmlMarkup.new(:indent => 2)
+  x = Builder::XmlMarkup.new
   x.instruct! :xml, :encoding => 'UTF-8', :version => '1.0'
   x.feed(:xmlns => "http://www.w3.org/2005/Atom") do
     x.id "#{url_base}/NEWS.atom.xml"
@@ -53,8 +53,6 @@ task :news_atom do
         url = "#{cgit_url}/tag/?id=#{tag[:tag]}"
         x.link :rel => "alternate", :type => "text/html", :href =>url
         x.id url
-        message_only = tag[:body].split(/\n.+\(\d+\):\n {6}/).first.strip
-        x.content({:type =>:text}, message_only)
         x.content(:type =>:xhtml) { x.pre tag[:body] }
       end
     end