From 220135091b4019b660a070fac5d623a44ea10612 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sun, 4 Dec 2011 12:08:05 -0800 Subject: [PATCH] fix link post titles in the rss feed (→ shows up in NNW4 Lite) --- bin/blog.rb | 5 +++-- templates/blog/link.mustache | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/blog.rb b/bin/blog.rb index c2c7ccc..b149d41 100755 --- a/bin/blog.rb +++ b/bin/blog.rb @@ -123,13 +123,14 @@ class Blag puts "ignoring unknown header: #{line}" end end + post[:type] = post[:link] ? :link : :post + post[:title] += " →" if post[:type] == :link post[:styles] = (post[:styles] || '').split(/\s*,\s*/) post[:tags] = (post[:tags] || '').split(/\s*,\s*/) post[:url] = @url + '/' + post[:filename] post[:timestamp] = post[:timestamp].to_i post[:content] = lines.join post[:body] = RDiscount.new(post[:content]).to_html - post[:type] = post[:link] ? :link : :post post[:rfc822] = Time.at(post[:timestamp]).rfc822 # comments on by default post[:comments] = true if post[:comments].nil? @@ -208,7 +209,7 @@ class Blag rss_posts.each do |post| xml.item do - xml.title post[:link] ? "#{post[:title]} →" : post[:title] + xml.title post[:title] xml.description rss_html(post) xml.pubDate post[:rfc822] xml.author post[:author] diff --git a/templates/blog/link.mustache b/templates/blog/link.mustache index dcfa2b7..8a13604 100644 --- a/templates/blog/link.mustache +++ b/templates/blog/link.mustache @@ -1,6 +1,6 @@
-

{{title}} →

+

{{title}}

{{{body}}}