Merge branch 'feed'
This commit is contained in:
commit
832a739eba
BIN
.feed.xml.swp
Normal file
BIN
.feed.xml.swp
Normal file
Binary file not shown.
|
@ -31,7 +31,10 @@ sub startup($self) {
|
|||
});
|
||||
|
||||
$self->helper(hr => sub ($c) {
|
||||
state $hr = HTML::Restrict->new(strip_enclosed_content => [])
|
||||
state $hr = HTML::Restrict->new(
|
||||
filter_text => 0,
|
||||
strip_enclosed_content => []
|
||||
)
|
||||
});
|
||||
|
||||
$self->helper(thread => sub ($c) {
|
||||
|
|
|
@ -105,15 +105,16 @@ sub feed($self) {
|
|||
);
|
||||
|
||||
for my $thread (@{$threads}) {
|
||||
my $item_link =
|
||||
$self->url_for(
|
||||
my $description =
|
||||
$self->markdown($self->truncate_text($thread->{'body'}));
|
||||
my $item_link = $self->url_for(
|
||||
single_thread => {thread_id => $thread->{'id'}}
|
||||
)->to_abs;
|
||||
|
||||
$rss->add_item(
|
||||
title => $thread->{'title'},
|
||||
link => $item_link,
|
||||
description => $self->truncate_text($thread->{'body'}),
|
||||
description => $description,
|
||||
author => $thread->{'author'},
|
||||
guid => $thread->{'id'},
|
||||
pubDate => $thread->{'date'}
|
||||
|
|
Loading…
Reference in a new issue