GoogleSitemapsプラグイン

http://hikiwiki.org/ja/google-sitemaps.rb.html
その2

大野
http://elpeo.jp/diary/

に教えてもらいつつ以下のような感じにしてみた。
*** google-sitemaps.rb.orig Fri Jul 21 02:55:20 2006
--- google-sitemaps.rb Fri Aug 18 16:14:08 2006
***************
*** 3,8 ****
--- 3,11 ----
# Copyright (C) 2005 Kazuhiko
# Copyright (C) 2005 Kouhei Yanagita

+ require "stringio"
+ require "zlib"
+
def google_sitemaps_body
sitemaps = %Q!\n!
sitemaps << %Q!\n!
***************
*** 34,41 ****
header['Content-Language'] = @conf.lang
header['Pragma'] = 'no-cache'
header['Cache-Control'] = 'no-cache'
print @cgi.header(header)
! puts body

nil # Don't move to the 'FrontPage'
end
--- 37,49 ----
header['Content-Language'] = @conf.lang
header['Pragma'] = 'no-cache'
header['Cache-Control'] = 'no-cache'
+ header['Content-Encoding'] = 'x-gzip'
print @cgi.header(header)
! io = StringIO.new
! gz = Zlib::GzipWriter.new(io)
! gz.write(body)
! gz.finish
! print io.string

nil # Don't move to the 'FrontPage'
end