mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
fix link post titles in the rss feed (→ shows up in NNW4 Lite)
This commit is contained in:
parent
0ac7943b29
commit
220135091b
2 changed files with 4 additions and 3 deletions
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<article>
|
||||
<header>
|
||||
<h2><a href="{{link}}">{{title}} →</a></h2>
|
||||
<h2><a href="{{link}}">{{title}}</a></h2>
|
||||
<time>{{date}}</time>
|
||||
</header>
|
||||
{{{body}}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue